92
92
$(foreach target,$(CFG_TARGET_TRIPLES), \
93
93
$(eval $(call DEF_TARGET_COMMANDS,$(target))))
94
94
95
- # Target platform specific variables
96
- # for arm-linux-androidabi
97
- define DEF_ADB_DEVICE_STATUS
98
- CFG_ADB_DEVICE_STATUS=$(1 )
99
- endef
100
-
101
- $(foreach target,$(CFG_TARGET_TRIPLES), \
102
- $(if $(findstring $(target),"arm-linux-androideabi"), \
103
- $(if $(findstring adb,$(CFG_ADB)), \
104
- $(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[ :blank:]]+device')), \
105
- $(info check : $(target ) test enabled \
106
- $(info check : android device attached) \
107
- $(eval $(call DEF_ADB_DEVICE_STATUS, true))), \
108
- $(info check : $(target ) test disabled \
109
- $(info check : android device not attached) \
110
- $(eval $(call DEF_ADB_DEVICE_STATUS, false))) \
111
- ), \
112
- $(info check : $(target ) test disabled \
113
- $(info check : adb not found) \
114
- $(eval $(call DEF_ADB_DEVICE_STATUS, false))) \
115
- ), \
116
- ) \
117
- )
118
-
119
- ifeq ($(CFG_ADB_DEVICE_STATUS ) ,true)
120
- CFG_ADB_TEST_DIR =/data/tmp
121
-
122
- $(info check : android device test dir $(CFG_ADB_TEST_DIR ) ready \
123
- $(shell adb remount 1>/dev/null) \
124
- $(shell adb shell mkdir $(CFG_ADB_TEST_DIR) 1>/dev/null) \
125
- $(shell adb push $(CFG_ANDROID_CROSS_PATH)/arm-linux-androideabi/lib/armv7-a/libgnustl_shared.so \
126
- $(CFG_ADB_TEST_DIR) 1>/dev/null) \
127
- )
128
- else
129
- CFG_ADB_TEST_DIR =
130
- endif
131
-
132
95
133
96
# #####################################################################
134
97
# Main test targets
@@ -356,53 +319,11 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
356
319
&& touch $$@
357
320
endef
358
321
359
- define DEF_TEST_CRATE_RULES_arm-linux-androideabi
360
- check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) -exec: $$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) )
361
-
362
- $$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) : \
363
- $(3 ) /test/$(4 ) test.stage$(1 ) -$(2 )$$(X_$(2 ) )
364
- @$$(call E, run: $$< via adb)
365
- @$(CFG_ADB ) push $$< $(CFG_ADB_TEST_DIR )
366
- @$(CFG_ADB ) shell LD_LIBRARY_PATH=$(CFG_ADB_TEST_DIR ) \
367
- $(CFG_ADB_TEST_DIR ) /`echo $$< | sed 's/.*\///'` \
368
- --logfile $(CFG_ADB_TEST_DIR ) /check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .log > \
369
- tmp/check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .tmp
370
- @cat tmp/check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .tmp
371
- @touch tmp/check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .log
372
- @$(CFG_ADB ) pull $(CFG_ADB_TEST_DIR ) /check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .log tmp/
373
- @$(CFG_ADB ) shell rm $(CFG_ADB_TEST_DIR ) /check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .log
374
- @if grep -q "result: ok" tmp/check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .tmp; \
375
- then \
376
- rm tmp/check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .tmp; \
377
- touch $$@ ; \
378
- else \
379
- rm tmp/check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .tmp; \
380
- exit 101; \
381
- fi
382
- endef
383
-
384
- define DEF_TEST_CRATE_RULES_null
385
- check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) -exec: $$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) )
386
-
387
- $$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) : \
388
- $(3 ) /test/$(4 ) test.stage$(1 ) -$(2 )$$(X_$(2 ) )
389
- @$$(call E, run: skipped $$< )
390
- @touch $$@
391
- endef
392
-
393
322
$(foreach host,$(CFG_HOST_TRIPLES), \
394
323
$(foreach target,$(CFG_TARGET_TRIPLES), \
395
324
$(foreach stage,$(STAGES), \
396
325
$(foreach crate, $(TEST_CRATES), \
397
- $(if $(findstring $(target),$(CFG_BUILD_TRIPLE)), \
398
- $(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))), \
399
- $(if $(findstring $(target),"arm-linux-androideabi"), \
400
- $(if $(findstring $(CFG_ADB_DEVICE_STATUS),"true"), \
401
- $(eval $(call DEF_TEST_CRATE_RULES_arm-linux-androideabi,$(stage),$(target),$(host),$(crate))), \
402
- $(eval $(call DEF_TEST_CRATE_RULES_null,$(stage),$(target),$(host),$(crate))) \
403
- ), \
404
- $(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))) \
405
- ))))))
326
+ $(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate)))))))
406
327
407
328
408
329
# #####################################################################
@@ -499,9 +420,6 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
499
420
--rustc-path $$(HBIN$(1 ) _H_$(3 ) ) /rustc$$(X_$(3 ) ) \
500
421
--aux-base $$(S ) src/test/auxiliary/ \
501
422
--stage-id stage$(1 ) -$(2 ) \
502
- --target $(2 ) \
503
- --adb-path=$(CFG_ADB ) \
504
- --adb-test-dir=$(CFG_ADB_TEST_DIR ) \
505
423
--rustcflags "$(RUSTC_FLAGS_$(2 ) ) $$(CFG_RUSTC_FLAGS ) --target=$(2 ) " \
506
424
$$(CTEST_TESTARGS )
507
425
@@ -536,7 +454,7 @@ ifeq ($$(CTEST_DISABLE_$(4)),)
536
454
$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) : \
537
455
$$(TEST_SREQ$(1 ) _T_$(2 ) _H_$(3 ) ) \
538
456
$$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
539
- @$$(call E, run $(4) [$(2)] : $$<)
457
+ @$$(call E, run $(4): $$<)
540
458
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
541
459
$$(CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \
542
460
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
547
465
$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) : \
548
466
$$(TEST_SREQ$(1 ) _T_$(2 ) _H_$(3 ) ) \
549
467
$$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
550
- @$$(call E, run $(4) [$(2)] : $$<)
468
+ @$$(call E, run $(4): $$<)
551
469
@$$(call E, warning: tests disabled: $$(CTEST_DISABLE_$(4)))
552
470
touch $$@
553
471
@@ -588,7 +506,7 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
588
506
$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) : \
589
507
$$(TEST_SREQ$(1 ) _T_$(2 ) _H_$(3 ) ) \
590
508
$$(PRETTY_DEPS_$(4 ) )
591
- @$$(call E, run pretty-rpass [ $( 2 ) ] : $$< )
509
+ @$$(call E, run pretty-rpass: $$< )
592
510
$$(Q )$$(call CFG_RUN_CTEST_$(2 ) ,$(1 ) ,$$< ,$(3 ) ) \
593
511
$$(PRETTY_ARGS$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) ) \
594
512
--logfile $$(call TEST_LOG_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) \
@@ -615,7 +533,7 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3)
615
533
$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,doc-$(4 ) ) : \
616
534
$$(TEST_SREQ$(1 ) _T_$(2 ) _H_$(3 ) ) \
617
535
doc-$(4 ) -extract$(3 )
618
- @$$(call E, run doc-$(4 ) [ $( 2 ) ] : $$< )
536
+ @$$(call E, run doc-$(4 ) : $$< )
619
537
$$(Q )$$(call CFG_RUN_CTEST_$(2 ) ,$(1 ) ,$$< ,$(3 ) ) \
620
538
$$(DOC_TEST_ARGS$(1 ) -T-$(2 ) -H-$(3 ) -doc-$(4 ) ) \
621
539
--logfile $$(call TEST_LOG_FILE,$(1 ) ,$(2 ) ,$(3 ) ,doc-$(4 ) ) \
0 commit comments