fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
985 B19 linesraw
1# ignore-cross-compile
2include ../tools.mk
3
4# Test expected libtest's junit output
5
6OUTPUT_FILE_DEFAULT := $(TMPDIR)/libtest-junit-output-default.xml
7OUTPUT_FILE_STDOUT_SUCCESS := $(TMPDIR)/libtest-junit-output-stdout-success.xml
8
9all: f.rs validate_junit.py output-default.xml output-stdout-success.xml
10	$(RUSTC) --test f.rs
11	RUST_BACKTRACE=0 $(call RUN,f) -Z unstable-options --test-threads=1 --format=junit > $(OUTPUT_FILE_DEFAULT) || true
12	RUST_BACKTRACE=0 $(call RUN,f) -Z unstable-options --test-threads=1 --format=junit --show-output > $(OUTPUT_FILE_STDOUT_SUCCESS) || true
13
14	cat $(OUTPUT_FILE_DEFAULT) | "$(PYTHON)" validate_junit.py
15	cat $(OUTPUT_FILE_STDOUT_SUCCESS) | "$(PYTHON)" validate_junit.py
16
17	# Normalize the actual output and compare to expected output file
18	cat $(OUTPUT_FILE_DEFAULT) | sed 's/time="[0-9.]*"/time="$$TIME"/g' | diff output-default.xml -
19	cat $(OUTPUT_FILE_STDOUT_SUCCESS) | sed 's/time="[0-9.]*"/time="$$TIME"/g' | diff output-stdout-success.xml -