Skip to content

Commit e034af2

Browse files
committed
Fix xtests build.
1 parent a7d6675 commit e034af2

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

xtests/build.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,13 @@ def read_all_tests(src_files):
4040
for name, test in read_tests(filename):
4141
yield name, test
4242

43+
def list_src_files(src_dir):
44+
for root, _, files in os.walk(src_dir):
45+
for filename in files:
46+
yield os.path.join(root, filename)
47+
4348
if __name__ == '__main__':
44-
src_files = [os.path.join(SRC_DIR, f) for f in os.listdir(SRC_DIR)]
49+
src_files = list(list_src_files(SRC_DIR))
4550
output_file = os.path.join(TEST_DIR, 'tests.rs')
4651

4752
if should_build(output_file, src_files):

xtests/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::process::Command;
22

33
fn main() {
4-
Command::new("python").arg("build.py").status().unwrap();
4+
let status = Command::new("python").arg("build.py").status().unwrap();
5+
assert!(status.success());
56
}

xtests/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ extern crate objc;
33

44
pub use objc::*;
55

6-
#[path = "../src/id.rs"]
7-
mod id;
86
#[path = "../src/test_utils.rs"]
97
mod test_utils;
108

0 commit comments

Comments
 (0)