File tree 3 files changed +16
-11
lines changed
3 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 31
31
- name : Install qemu
32
32
run : sudo apt-get install qemu-system
33
33
34
- - name : Run build
35
- run : make
34
+ - name : Run build & test
35
+ run : make test
Original file line number Diff line number Diff line change 1
1
/kernel
2
2
/target
3
- /kernel-test
3
+ /kernel-test
4
+ .test-log.txt
Original file line number Diff line number Diff line change 29
29
cp target/$(RUST_TARGET ) /$(RUST_PROFILE_SUBDIR ) /hexium_os kernel
30
30
31
31
test :
32
- RUSTFLAGS=" -C relocation-model=static" cargo build --tests --target $(RUST_TARGET ) --profile $(RUST_PROFILE )
33
-
34
32
mkdir -p kernel-test
35
-
36
- # Copy first two hexium_os-* test binaries - the third appears to be a normal build exec.
37
- find target/$(RUST_TARGET)/$(RUST_PROFILE_SUBDIR)/deps -maxdepth 1 -type f -executable -name 'hexium_os-*' | head -n 2 | xargs -I{} cp {} kernel-test/
38
-
39
- # Copy all remain integration test binaries except hexium_os-*
40
- find target/$(RUST_TARGET)/$(RUST_PROFILE_SUBDIR)/deps -maxdepth 1 -type f -executable ! -name 'hexium_os-*' -exec cp {} kernel-test/ \;
33
+ RUSTFLAGS=" -C relocation-model=static" cargo test --no-run --target $(RUST_TARGET ) --profile $(RUST_PROFILE ) --color always \
34
+ 2>&1 | tee .test-log.txt
35
+ @grep -o ' target/[^ )]*' .test-log.txt | while read -r path; do \
36
+ if [ -x " $$ path" ]; then \
37
+ echo " Copying $$ path to kernel-test/" ; \
38
+ cp " $$ path" kernel-test/; \
39
+ else \
40
+ echo " Skipping non-executable: $$ path" ; \
41
+ fi \
42
+ done
43
+
44
+ @rm .test-log.txt
41
45
42
46
.PHONY : clean
43
47
clean :
You can’t perform that action at this time.
0 commit comments