diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7cd55e8..4e62bd9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,7 +30,7 @@ jobs: - name: Build IrpTransmogrifier run: | mvn -B -V package - working-directory: irp/tests/IrpTransmogrifier + working-directory: IrpTransmogrifier - name: Build run: cargo build --verbose - name: Run tests diff --git a/.gitmodules b/.gitmodules index e90590d..bfaae87 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "irp/tests/IrpTransmogrifier"] - path = irp/tests/IrpTransmogrifier +[submodule "IrpTransmogrifier"] + path = IrpTransmogrifier url = https://github.com/bengtmartensson/IrpTransmogrifier diff --git a/irp/tests/IrpTransmogrifier b/IrpTransmogrifier similarity index 100% rename from irp/tests/IrpTransmogrifier rename to IrpTransmogrifier diff --git a/cir/tests/decode_tests.rs b/cir/tests/decode_tests.rs index d4cb6b3..8bd9bb2 100644 --- a/cir/tests/decode_tests.rs +++ b/cir/tests/decode_tests.rs @@ -217,7 +217,7 @@ fn irp() { "decode", "-i", "Blaupunkt", - "--irp-protocols=../irp/tests/IrpTransmogrifier/src/main/resources/IrpProtocols.xml", + "--irp-protocols=../IrpTransmogrifier/src/main/resources/IrpProtocols.xml", "--raw=+512 -2560 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -23040 +512 -2560 +512 -1024 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +1024 -1024 +512 -512 +512 -120832 +512 -2560 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -512 +512 -23040", ]) .assert(); diff --git a/cir/tests/encode_tests.rs b/cir/tests/encode_tests.rs index bf50bc5..828ba05 100644 --- a/cir/tests/encode_tests.rs +++ b/cir/tests/encode_tests.rs @@ -14,6 +14,8 @@ fn encode_test() { "{40k,600}<1,-1|2,-1>(4,-1,F:8,^45m)+[F:0..255]", "--repeats", "1", + "--irp-protocols", + "../IrpTransmogrifier/src/main/resources/IrpProtocols.xml", ]) .assert(); @@ -73,7 +75,7 @@ fn encode_irp_test() { "--dry-run", "--irp=Blaupunkt", "--irp-protocols", - "../irp/tests/IrpTransmogrifier/src/main/resources/IrpProtocols.xml", + "../IrpTransmogrifier/src/main/resources/IrpProtocols.xml", "-aF=0,D=1", ]) .assert(); diff --git a/irp/tests/bpf_decoding.rs b/irp/tests/bpf_decoding.rs index 0d4131b..d546c49 100644 --- a/irp/tests/bpf_decoding.rs +++ b/irp/tests/bpf_decoding.rs @@ -16,7 +16,7 @@ use std::{ #[test] fn decode_all() { let mut protocols = Protocol::parse(&PathBuf::from( - "tests/IrpTransmogrifier/src/main/resources/IrpProtocols.xml", + "../IrpTransmogrifier/src/main/resources/IrpProtocols.xml", )) .unwrap(); diff --git a/irp/tests/tests.rs b/irp/tests/tests.rs index 7c224a7..30f6a35 100644 --- a/irp/tests/tests.rs +++ b/irp/tests/tests.rs @@ -267,7 +267,7 @@ fn vars() { #[test] fn parse_all_of_them() { let protocols = Protocol::parse(&PathBuf::from( - "tests/IrpTransmogrifier/src/main/resources/IrpProtocols.xml", + "../IrpTransmogrifier/src/main/resources/IrpProtocols.xml", )) .unwrap(); @@ -329,13 +329,13 @@ fn compare_with_rounding(l: &[u32], r: &[u32]) -> bool { #[test] fn compare_encode_to_transmogrifier() { let mut protocols = Protocol::parse(&PathBuf::from( - "tests/IrpTransmogrifier/src/main/resources/IrpProtocols.xml", + "../IrpTransmogrifier/src/main/resources/IrpProtocols.xml", )) .unwrap(); let mut total_tests = 0; let mut fails = 0; - let jvm = create_jvm("tests/IrpTransmogrifier"); + let jvm = create_jvm("../IrpTransmogrifier"); let mut rng = rand::thread_rng(); protocols.push(Protocol { @@ -427,7 +427,7 @@ fn compare_encode_to_transmogrifier() { #[test] fn decode_all() { let mut protocols = Protocol::parse(&PathBuf::from( - "tests/IrpTransmogrifier/src/main/resources/IrpProtocols.xml", + "../IrpTransmogrifier/src/main/resources/IrpProtocols.xml", )) .unwrap();