From 9881c7da0329f2aa03df45c23f8790e26793cb01 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Sat, 27 Apr 2024 11:33:51 +0100 Subject: [PATCH] Move ir-ctl and lircd tests libraries into tests directory Signed-off-by: Sean Young --- Cargo.toml | 8 ++++---- {libirctl => tests/libirctl}/Cargo.toml | 0 {libirctl => tests/libirctl}/build.rs | 0 {libirctl => tests/libirctl}/src/bpf_encoder.c | 0 {libirctl => tests/libirctl}/src/bpf_encoder.h | 0 {libirctl => tests/libirctl}/src/ir-encode.c | 0 {libirctl => tests/libirctl}/src/ir-encode.h | 0 {libirctl => tests/libirctl}/src/keymap.c | 0 {libirctl => tests/libirctl}/src/keymap.h | 0 {libirctl => tests/libirctl}/src/lib.rs | 0 {libirctl => tests/libirctl}/src/lirc.h | 0 {libirctl => tests/libirctl}/src/toml.c | 0 {libirctl => tests/libirctl}/src/toml.h | 0 {liblircd => tests/liblircd}/Cargo.toml | 0 {liblircd => tests/liblircd}/build.rs | 0 {liblircd => tests/liblircd}/src/config_file.c | 0 {liblircd => tests/liblircd}/src/config_file.h | 0 {liblircd => tests/liblircd}/src/config_flags.h | 0 {liblircd => tests/liblircd}/src/driver.c | 0 {liblircd => tests/liblircd}/src/driver.h | 0 {liblircd => tests/liblircd}/src/ir_remote.c | 0 {liblircd => tests/liblircd}/src/ir_remote.h | 0 {liblircd => tests/liblircd}/src/ir_remote_types.h | 0 {liblircd => tests/liblircd}/src/lib.rs | 0 {liblircd => tests/liblircd}/src/lirc.h | 0 {liblircd => tests/liblircd}/src/lirc_log.c | 0 {liblircd => tests/liblircd}/src/lirc_log.h | 0 {liblircd => tests/liblircd}/src/receive.c | 0 {liblircd => tests/liblircd}/src/receive.h | 0 {liblircd => tests/liblircd}/src/transmit.c | 0 {liblircd => tests/liblircd}/src/transmit.h | 0 {liblircd => tests/liblircd}/tests/transmit.rs | 10 +++++----- 32 files changed, 9 insertions(+), 9 deletions(-) rename {libirctl => tests/libirctl}/Cargo.toml (100%) rename {libirctl => tests/libirctl}/build.rs (100%) rename {libirctl => tests/libirctl}/src/bpf_encoder.c (100%) rename {libirctl => tests/libirctl}/src/bpf_encoder.h (100%) rename {libirctl => tests/libirctl}/src/ir-encode.c (100%) rename {libirctl => tests/libirctl}/src/ir-encode.h (100%) rename {libirctl => tests/libirctl}/src/keymap.c (100%) rename {libirctl => tests/libirctl}/src/keymap.h (100%) rename {libirctl => tests/libirctl}/src/lib.rs (100%) rename {libirctl => tests/libirctl}/src/lirc.h (100%) rename {libirctl => tests/libirctl}/src/toml.c (100%) rename {libirctl => tests/libirctl}/src/toml.h (100%) rename {liblircd => tests/liblircd}/Cargo.toml (100%) rename {liblircd => tests/liblircd}/build.rs (100%) rename {liblircd => tests/liblircd}/src/config_file.c (100%) rename {liblircd => tests/liblircd}/src/config_file.h (100%) rename {liblircd => tests/liblircd}/src/config_flags.h (100%) rename {liblircd => tests/liblircd}/src/driver.c (100%) rename {liblircd => tests/liblircd}/src/driver.h (100%) rename {liblircd => tests/liblircd}/src/ir_remote.c (100%) rename {liblircd => tests/liblircd}/src/ir_remote.h (100%) rename {liblircd => tests/liblircd}/src/ir_remote_types.h (100%) rename {liblircd => tests/liblircd}/src/lib.rs (100%) rename {liblircd => tests/liblircd}/src/lirc.h (100%) rename {liblircd => tests/liblircd}/src/lirc_log.c (100%) rename {liblircd => tests/liblircd}/src/lirc_log.h (100%) rename {liblircd => tests/liblircd}/src/receive.c (100%) rename {liblircd => tests/liblircd}/src/receive.h (100%) rename {liblircd => tests/liblircd}/src/transmit.c (100%) rename {liblircd => tests/liblircd}/src/transmit.h (100%) rename {liblircd => tests/liblircd}/tests/transmit.rs (93%) diff --git a/Cargo.toml b/Cargo.toml index 83c82181..0dd7259f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,15 +33,15 @@ irp = { version = "0.3.2", path = "irp" } [dev-dependencies] assert_cmd = "2.0" serde_json = "1.0" -liblircd = { path = "liblircd" } -libirctl = { path = "libirctl" } +liblircd = { path = "tests/liblircd" } +libirctl = { path = "tests/libirctl" } rand = "0.8" [workspace] members = [ "irp", - "liblircd", - "libirctl", + "tests/liblircd", + "tests/libirctl", "irp/tests/rust-irptransmogrifier", ] diff --git a/libirctl/Cargo.toml b/tests/libirctl/Cargo.toml similarity index 100% rename from libirctl/Cargo.toml rename to tests/libirctl/Cargo.toml diff --git a/libirctl/build.rs b/tests/libirctl/build.rs similarity index 100% rename from libirctl/build.rs rename to tests/libirctl/build.rs diff --git a/libirctl/src/bpf_encoder.c b/tests/libirctl/src/bpf_encoder.c similarity index 100% rename from libirctl/src/bpf_encoder.c rename to tests/libirctl/src/bpf_encoder.c diff --git a/libirctl/src/bpf_encoder.h b/tests/libirctl/src/bpf_encoder.h similarity index 100% rename from libirctl/src/bpf_encoder.h rename to tests/libirctl/src/bpf_encoder.h diff --git a/libirctl/src/ir-encode.c b/tests/libirctl/src/ir-encode.c similarity index 100% rename from libirctl/src/ir-encode.c rename to tests/libirctl/src/ir-encode.c diff --git a/libirctl/src/ir-encode.h b/tests/libirctl/src/ir-encode.h similarity index 100% rename from libirctl/src/ir-encode.h rename to tests/libirctl/src/ir-encode.h diff --git a/libirctl/src/keymap.c b/tests/libirctl/src/keymap.c similarity index 100% rename from libirctl/src/keymap.c rename to tests/libirctl/src/keymap.c diff --git a/libirctl/src/keymap.h b/tests/libirctl/src/keymap.h similarity index 100% rename from libirctl/src/keymap.h rename to tests/libirctl/src/keymap.h diff --git a/libirctl/src/lib.rs b/tests/libirctl/src/lib.rs similarity index 100% rename from libirctl/src/lib.rs rename to tests/libirctl/src/lib.rs diff --git a/libirctl/src/lirc.h b/tests/libirctl/src/lirc.h similarity index 100% rename from libirctl/src/lirc.h rename to tests/libirctl/src/lirc.h diff --git a/libirctl/src/toml.c b/tests/libirctl/src/toml.c similarity index 100% rename from libirctl/src/toml.c rename to tests/libirctl/src/toml.c diff --git a/libirctl/src/toml.h b/tests/libirctl/src/toml.h similarity index 100% rename from libirctl/src/toml.h rename to tests/libirctl/src/toml.h diff --git a/liblircd/Cargo.toml b/tests/liblircd/Cargo.toml similarity index 100% rename from liblircd/Cargo.toml rename to tests/liblircd/Cargo.toml diff --git a/liblircd/build.rs b/tests/liblircd/build.rs similarity index 100% rename from liblircd/build.rs rename to tests/liblircd/build.rs diff --git a/liblircd/src/config_file.c b/tests/liblircd/src/config_file.c similarity index 100% rename from liblircd/src/config_file.c rename to tests/liblircd/src/config_file.c diff --git a/liblircd/src/config_file.h b/tests/liblircd/src/config_file.h similarity index 100% rename from liblircd/src/config_file.h rename to tests/liblircd/src/config_file.h diff --git a/liblircd/src/config_flags.h b/tests/liblircd/src/config_flags.h similarity index 100% rename from liblircd/src/config_flags.h rename to tests/liblircd/src/config_flags.h diff --git a/liblircd/src/driver.c b/tests/liblircd/src/driver.c similarity index 100% rename from liblircd/src/driver.c rename to tests/liblircd/src/driver.c diff --git a/liblircd/src/driver.h b/tests/liblircd/src/driver.h similarity index 100% rename from liblircd/src/driver.h rename to tests/liblircd/src/driver.h diff --git a/liblircd/src/ir_remote.c b/tests/liblircd/src/ir_remote.c similarity index 100% rename from liblircd/src/ir_remote.c rename to tests/liblircd/src/ir_remote.c diff --git a/liblircd/src/ir_remote.h b/tests/liblircd/src/ir_remote.h similarity index 100% rename from liblircd/src/ir_remote.h rename to tests/liblircd/src/ir_remote.h diff --git a/liblircd/src/ir_remote_types.h b/tests/liblircd/src/ir_remote_types.h similarity index 100% rename from liblircd/src/ir_remote_types.h rename to tests/liblircd/src/ir_remote_types.h diff --git a/liblircd/src/lib.rs b/tests/liblircd/src/lib.rs similarity index 100% rename from liblircd/src/lib.rs rename to tests/liblircd/src/lib.rs diff --git a/liblircd/src/lirc.h b/tests/liblircd/src/lirc.h similarity index 100% rename from liblircd/src/lirc.h rename to tests/liblircd/src/lirc.h diff --git a/liblircd/src/lirc_log.c b/tests/liblircd/src/lirc_log.c similarity index 100% rename from liblircd/src/lirc_log.c rename to tests/liblircd/src/lirc_log.c diff --git a/liblircd/src/lirc_log.h b/tests/liblircd/src/lirc_log.h similarity index 100% rename from liblircd/src/lirc_log.h rename to tests/liblircd/src/lirc_log.h diff --git a/liblircd/src/receive.c b/tests/liblircd/src/receive.c similarity index 100% rename from liblircd/src/receive.c rename to tests/liblircd/src/receive.c diff --git a/liblircd/src/receive.h b/tests/liblircd/src/receive.h similarity index 100% rename from liblircd/src/receive.h rename to tests/liblircd/src/receive.h diff --git a/liblircd/src/transmit.c b/tests/liblircd/src/transmit.c similarity index 100% rename from liblircd/src/transmit.c rename to tests/liblircd/src/transmit.c diff --git a/liblircd/src/transmit.h b/tests/liblircd/src/transmit.h similarity index 100% rename from liblircd/src/transmit.h rename to tests/liblircd/src/transmit.h diff --git a/liblircd/tests/transmit.rs b/tests/liblircd/tests/transmit.rs similarity index 93% rename from liblircd/tests/transmit.rs rename to tests/liblircd/tests/transmit.rs index e209f020..a0ff8f1f 100644 --- a/liblircd/tests/transmit.rs +++ b/tests/liblircd/tests/transmit.rs @@ -3,7 +3,7 @@ use std::fs::read_to_string; #[test] fn encode() { - let conf = read_to_string("../testdata/lircd_conf/thomson/ROC740.lircd.conf").unwrap(); + let conf = read_to_string("../../testdata/lircd_conf/thomson/ROC740.lircd.conf").unwrap(); //unsafe { lirc_log_set_stdout() }; @@ -37,7 +37,7 @@ fn encode() { } } - let conf = read_to_string("../testdata/lircd_conf/motorola/DCH3200.lircd.conf").unwrap(); + let conf = read_to_string("../../testdata/lircd_conf/motorola/DCH3200.lircd.conf").unwrap(); // unsafe { lirc_log_set_stdout() }; @@ -70,7 +70,7 @@ fn encode() { } } - let conf = read_to_string("../testdata/lircd_conf/motorola/QIP2500.lircd.conf").unwrap(); + let conf = read_to_string("../../testdata/lircd_conf/motorola/QIP2500.lircd.conf").unwrap(); let conf = LircdConf::parse(&conf).unwrap(); @@ -110,7 +110,7 @@ fn encode() { // now test decode of a remote with toggle_bit_mask set (more than one bit) - let conf = read_to_string("../testdata/lircd_conf/d-link/DSM-10.lircd.conf").unwrap(); + let conf = read_to_string("../../testdata/lircd_conf/d-link/DSM-10.lircd.conf").unwrap(); //unsafe { lirc_log_set_stdout() }; @@ -163,7 +163,7 @@ fn encode() { // now test decoder of a remote with an ignore_mask - let conf = read_to_string("../testdata/lircd_conf/apple/A1156.lircd.conf").unwrap(); + let conf = read_to_string("../../testdata/lircd_conf/apple/A1156.lircd.conf").unwrap(); //unsafe { lirc_log_set_stdout() };