From 7c6354c1e759f364cdd2acb17a158aa0173c999a Mon Sep 17 00:00:00 2001 From: Victor Brekenfeld Date: Sat, 15 Dec 2018 21:18:54 +0100 Subject: [PATCH 1/3] Fixup example features --- Cargo.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index f08b880..433ede9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,4 +54,8 @@ backend_session_logind = ["dbus", "systemd", "backend_session"] renderer_gl = ["gl_generator"] renderer_glium = ["renderer_gl", "glium"] native_lib = ["wayland-sys", "wayland-server/native_lib", "wayland-protocols/native_server"] -xwayland = [] \ No newline at end of file +xwayland = [] + +[[example]] +name = "raw_drm" +required-features = ["backend_drm_legacy"] \ No newline at end of file From f3c37de1c02fe33ac023b42ebaecf3e4dfb74df2 Mon Sep 17 00:00:00 2001 From: Victor Brekenfeld Date: Sat, 15 Dec 2018 21:20:08 +0100 Subject: [PATCH 2/3] Fix example crates --- examples/raw_drm.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/raw_drm.rs b/examples/raw_drm.rs index a6d9764..dbc008b 100644 --- a/examples/raw_drm.rs +++ b/examples/raw_drm.rs @@ -1,10 +1,8 @@ -extern crate drm; extern crate smithay; #[macro_use] extern crate slog; extern crate slog_term; -use drm::{buffer::PixelFormat, control::dumbbuffer::DumbBuffer}; use slog::Drain; use smithay::{ backend::drm::{ @@ -13,9 +11,14 @@ use smithay::{ Device, DeviceHandler, RawSurface, Surface, }, reexports::{ - drm::control::{ - connector::{self, State as ConnectorState}, - crtc, encoder, framebuffer, Device as ControlDevice, ResourceInfo, + drm::{ + buffer::PixelFormat, + control::{ + connector::{self, State as ConnectorState}, + crtc, + dumbbuffer::DumbBuffer, + encoder, framebuffer, Device as ControlDevice, ResourceInfo, + }, }, wayland_server::calloop::EventLoop, }, From cea809afec97f43acea601978511efaec87d5910 Mon Sep 17 00:00:00 2001 From: Victor Brekenfeld Date: Sat, 15 Dec 2018 22:08:23 +0100 Subject: [PATCH 3/3] Test our examples again --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index bcdaf7e..867e3f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,6 +51,8 @@ env: - FEATURES="default" # test all features simultaneously - FEATURES="all" + # test our examples + - FEATURES="examples" # test our house compositor - FEATURES="anvil" ANVIL_FEATURES="" - FEATURES="anvil" ANVIL_FEATURES="egl" @@ -91,6 +93,9 @@ script: vagga cargo-$TRAVIS_RUST_VERSION test && vagga cargo-$TRAVIS_RUST_VERSION doc --no-deps ;; + "examples") + vagga cargo-$TRAVIS_RUST_VERSION check --examples + ;; "cargo-fmt") vagga cargo-$TRAVIS_RUST_VERSION fmt --all -- --check ;;