From 8e1441e9fe7a8d14829449e17c280c8a020f6d73 Mon Sep 17 00:00:00 2001 From: Jeehoon Kang Date: Tue, 9 Jun 2020 15:08:00 +0000 Subject: [PATCH] Fix test script and bump Rust --- rust-toolchain | 2 +- tests/test_examples.rs | 23 ++++++++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/rust-toolchain b/rust-toolchain index a50908c..372cf40 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.42.0 +1.44.0 diff --git a/tests/test_examples.rs b/tests/test_examples.rs index fb0ff7e..8f4647f 100644 --- a/tests/test_examples.rs +++ b/tests/test_examples.rs @@ -61,7 +61,20 @@ fn test_opt_between_dirs>(from: &Path, to: &Pat } } -const SMALL_TEST_IGNORE_LIST: [&str; 10] = [ +const IRGEN_SMALL_TEST_IGNORE_LIST: [&str; 10] = [ + "examples/c/array.c", + "examples/c/array2.c", + "examples/c/array3.c", + "examples/c/array4.c", + "examples/c/array5.c", + "examples/c/float.c", + "examples/c/struct.c", + "examples/c/struct2.c", + "examples/c/struct3.c", + "examples/c/temp2.c", +]; + +const ASMGEN_SMALL_TEST_IGNORE_LIST: [&str; 10] = [ "examples/asmgen/array.ir", "examples/asmgen/array2.ir", "examples/asmgen/array3.ir", @@ -83,7 +96,7 @@ fn test_examples_write_c() { fn test_examples_irgen_small() { test_dir(Path::new("examples/c"), &OsStr::new("c"), |path| { let path_str = &path.to_str().expect("`path` must be transformed to `&str`"); - if SMALL_TEST_IGNORE_LIST.contains(path_str) { + if IRGEN_SMALL_TEST_IGNORE_LIST.contains(path_str) { return; } test_irgen(path) @@ -94,7 +107,7 @@ fn test_examples_irgen_small() { fn test_examples_irgen_large() { test_dir(Path::new("examples/c"), &OsStr::new("c"), |path| { let path_str = &path.to_str().expect("`path` must be transformed to `&str`"); - if SMALL_TEST_IGNORE_LIST.contains(path_str) { + if IRGEN_SMALL_TEST_IGNORE_LIST.contains(path_str) { test_irgen(path) } }); @@ -188,7 +201,7 @@ fn test_examples_gvn() { fn test_examples_asmgen_small() { test_dir(Path::new("examples/asmgen"), &OsStr::new("ir"), |path| { let path_str = &path.to_str().expect("`path` must be transformed to `&str`"); - if SMALL_TEST_IGNORE_LIST.contains(path_str) { + if ASMGEN_SMALL_TEST_IGNORE_LIST.contains(path_str) { return; } test_asmgen(path) @@ -199,7 +212,7 @@ fn test_examples_asmgen_small() { fn test_examples_asmgen_large() { test_dir(Path::new("examples/asmgen"), &OsStr::new("ir"), |path| { let path_str = &path.to_str().expect("`path` must be transformed to `&str`"); - if SMALL_TEST_IGNORE_LIST.contains(path_str) { + if ASMGEN_SMALL_TEST_IGNORE_LIST.contains(path_str) { test_asmgen(path) } });