mirror of
https://github.com/joleuger/vuinputd.git
synced 2026-07-18 00:45:07 +00:00
Add integration test for vibration/force feedback functionality
This commit is contained in:
parent
21bcff7fa3
commit
33b0a016c3
2 changed files with 40 additions and 0 deletions
|
|
@ -90,6 +90,8 @@ It reliably demonstrates the core concept — exposing `/dev/uinput` devices ins
|
|||
|
||||
### ✅ Goals for Production Readiness
|
||||
|
||||
* [ ] **Vibration/Force Feedback support:**
|
||||
|
||||
* [ ] **Steam input support:**
|
||||
Steam input is not supported, yet. For some strange reasons, steam creates 16 virtual devices. Maybe a race.
|
||||
|
||||
|
|
|
|||
|
|
@ -193,3 +193,41 @@ fn test_keyboard_in_container_with_vuinput_placement_on_host() {
|
|||
|
||||
assert!(out.status.success());
|
||||
}
|
||||
|
||||
|
||||
#[ignore = "not implemented yet"]
|
||||
#[cfg(all(
|
||||
feature = "requires-privileges",
|
||||
feature = "requires-uinput",
|
||||
feature = "requires-bwrap"
|
||||
))]
|
||||
#[test]
|
||||
fn test_gamepad_with_ff_in_container() {
|
||||
let _guard: run_vuinputd::VuinputdGuard = run_vuinputd::ensure_vuinputd_running(&[]);
|
||||
|
||||
let test_scenarios = env!("CARGO_BIN_EXE_test-scenarios");
|
||||
|
||||
let (builder, _ipc) = bwrap::BwrapBuilder::new()
|
||||
.unshare_net()
|
||||
.ro_bind("/", "/")
|
||||
.tmpfs("/tmp")
|
||||
// dev needs to be writable for the new devices
|
||||
.dev()
|
||||
// run needs to be writable for the udev devices
|
||||
.tmpfs("/run")
|
||||
.dev_bind("/dev/vuinput-test", "/dev/uinput")
|
||||
.die_with_parent()
|
||||
.with_ipc()
|
||||
.expect("failed to create IPC");
|
||||
|
||||
let out = builder
|
||||
.command(test_scenarios, &["--ipc","ff-xbox-gamepad"])
|
||||
.run()
|
||||
.unwrap_or_else(|e| panic!("failed to run bwrap!: {e}"));
|
||||
|
||||
println!("Output");
|
||||
println!("stdout: {}", str::from_utf8(&out.stdout).unwrap());
|
||||
println!("stderr: {}", str::from_utf8(&out.stderr).unwrap());
|
||||
|
||||
assert!(out.status.success());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue