Skip to content

Commit c20b906

Browse files
committed
auto merge of #8369 : yichoi/rust/arm-test, r=sanxiyn
fix some part of test code to pass make check on ARM Android
2 parents 74efdf6 + d463f4c commit c20b906

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

mk/install.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ endef
199199
$(foreach target,$(CFG_TARGET_TRIPLES), \
200200
$(if $(findstring $(target),"arm-linux-androideabi"), \
201201
$(if $(findstring adb,$(CFG_ADB)), \
202-
$(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
202+
$(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
203203
$(info install: install-runtime-target for $(target) enabled \
204204
$(info install: android device attached) \
205205
$(eval $(call DEF_ADB_DEVICE_STATUS, true))), \

mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ endef
123123
$(foreach target,$(CFG_TARGET_TRIPLES), \
124124
$(if $(findstring $(target),"arm-linux-androideabi"), \
125125
$(if $(findstring adb,$(CFG_ADB)), \
126-
$(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
126+
$(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
127127
$(info check: $(target) test enabled \
128128
$(info check: android device attached) \
129129
$(eval $(call DEF_ADB_DEVICE_STATUS, true))), \

src/libstd/run.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,11 +1309,11 @@ mod tests {
13091309
let output = str::from_bytes(prog.finish_with_output().output);
13101310
13111311
let r = os::env();
1312-
for &(k, v) in r.iter() {
1312+
for &(ref k, ref v) in r.iter() {
13131313
// don't check android RANDOM variables
1314-
if k != ~"RANDOM" {
1315-
assert!(output.contains(fmt!("%s=%s", k, v)) ||
1316-
output.contains(fmt!("%s=\'%s\'", k, v)));
1314+
if *k != ~"RANDOM" {
1315+
assert!(output.contains(fmt!("%s=%s", *k, *v)) ||
1316+
output.contains(fmt!("%s=\'%s\'", *k, *v)));
13171317
}
13181318
}
13191319
}

0 commit comments

Comments
 (0)