@@ -138,7 +138,6 @@ ALL_TEST_SOURCES := $(TEST_CFAIL_SOURCES_STAGE0) \
138
138
$(TEST_RFAIL_SOURCES_STAGE2 ) \
139
139
$(TEST_RPASS_SOURCES_STAGE2 )
140
140
141
-
142
141
FT := run_pass_stage2
143
142
FT_LIB := $(call CFG_LIB_NAME,$(FT ) )
144
143
FT_DRIVER := $(FT ) _driver
@@ -338,9 +337,31 @@ test/compile-fail/%.stage2.out.tmp: test/compile-fail/%.rc $(SREQ2)
338
337
$(Q ) grep --text --quiet \
339
338
"$$(grep error-pattern $< | cut -d : -f 2- | tr -d '\n\r')" $@
340
339
340
+ # Testing the stdtest crate
341
+
341
342
STDTEST_CRATE := $(S ) src/test/stdtest/stdtest.rc
342
343
STDTEST_INPUTS := $(wildcard $(S ) src/test/stdtest/* rs)
343
344
344
345
test/stdtest/stdtest.stage1$(X ) : $(STDTEST_CRATE ) $(STDTEST_INPUTS ) $(SREQ1 )
345
346
@$(call E, compile_and_link: $@ )
346
347
$(STAGE1 ) -o $@ $< --test
348
+
349
+ test/stdtest/stdtest.stage2$(X ) : $(STDTEST_CRATE ) $(STDTEST_INPUTS ) $(SREQ2 )
350
+ @$(call E, compile_and_link: $@ )
351
+ $(STAGE2 ) -o $@ $< --test
352
+
353
+ test/stdtest/stdtest.stage3$(X ) : $(STDTEST_CRATE ) $(STDTEST_INPUTS ) $(SREQ3 )
354
+ @$(call E, compile_and_link: $@ )
355
+ $(STAGE3 ) -o $@ $< --test
356
+
357
+ check-stage1-std :test/stdtest/stdtest.stage1$(X )
358
+ @$(call E, run: $< )
359
+ $(Q )$(call CFG_RUN_TARG,stage1,stage1, $< )
360
+
361
+ check-stage2-std :test/stdtest/stdtest.stage2$(X )
362
+ @$(call E, run: $< )
363
+ $(Q )$(call CFG_RUN_TARG,stage2,stage2, $< )
364
+
365
+ check-stage3-std :test/stdtest/stdtest.stage3$(X )
366
+ @$(call E, run: $< )
367
+ $(Q )$(call CFG_RUN_TARG,stage3,stage3, $< )
0 commit comments