Fix tests

This commit is contained in:
bjorn3 2023-09-10 15:50:48 +00:00
parent af97f86677
commit 4deb072e79
3 changed files with 7 additions and 7 deletions

View File

@ -5,10 +5,10 @@ OUT=$(TMPDIR)/emit
# --emit KIND=PATH should not affect crate hash vs --emit KIND
all: $(OUT)/a/libfoo.rlib $(OUT)/b/libfoo.rlib $(OUT)/c/libfoo.rlib \
$(TMPDIR)/libfoo.rlib
$(RUSTC) -Zls $(TMPDIR)/libfoo.rlib > $(TMPDIR)/base.txt
$(RUSTC) -Zls $(OUT)/a/libfoo.rlib > $(TMPDIR)/a.txt
$(RUSTC) -Zls $(OUT)/b/libfoo.rlib > $(TMPDIR)/b.txt
$(RUSTC) -Zls $(OUT)/c/libfoo.rlib > $(TMPDIR)/c.txt
$(RUSTC) -Zls=root $(TMPDIR)/libfoo.rlib > $(TMPDIR)/base.txt
$(RUSTC) -Zls=root $(OUT)/a/libfoo.rlib > $(TMPDIR)/a.txt
$(RUSTC) -Zls=root $(OUT)/b/libfoo.rlib > $(TMPDIR)/b.txt
$(RUSTC) -Zls=root $(OUT)/c/libfoo.rlib > $(TMPDIR)/c.txt
diff $(TMPDIR)/base.txt $(TMPDIR)/a.txt
diff $(TMPDIR)/base.txt $(TMPDIR)/b.txt

View File

@ -3,6 +3,6 @@ include ../tools.mk
all:
$(RUSTC) foo.rs
$(RUSTC) -Z ls $(TMPDIR)/foo
$(RUSTC) -Z ls=root $(TMPDIR)/foo
touch $(TMPDIR)/bar
$(RUSTC) -Z ls $(TMPDIR)/bar
$(RUSTC) -Z ls=root $(TMPDIR)/bar

View File

@ -8,7 +8,7 @@ all:
cp bar.rs $(TMPDIR)/bar.rlib
$(RUSTC) $(TMPDIR)/bar.rlib -o $(TMPDIR)/bar.rlib 2>&1 \
| $(CGREP) -e "the input file \".*bar.rlib\" would be overwritten by the generated executable"
$(RUSTC) foo.rs 2>&1 && $(RUSTC) -Z ls $(TMPDIR)/foo 2>&1
$(RUSTC) foo.rs 2>&1 && $(RUSTC) -Z ls=root $(TMPDIR)/foo 2>&1
cp foo.rs $(TMPDIR)/foo.rs
$(RUSTC) $(TMPDIR)/foo.rs -o $(TMPDIR)/foo.rs 2>&1 \
| $(CGREP) -e "the input file \".*foo.rs\" would be overwritten by the generated executable"