auto merge of #8369 : yichoi/rust/arm-test, r=sanxiyn

fix some part of test code to pass make check on ARM Android
This commit is contained in:
bors 2013-08-09 10:59:08 -07:00
commit c20b90647e
3 changed files with 6 additions and 6 deletions

View File

@ -199,7 +199,7 @@ endef
$(foreach target,$(CFG_TARGET_TRIPLES), \
$(if $(findstring $(target),"arm-linux-androideabi"), \
$(if $(findstring adb,$(CFG_ADB)), \
$(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
$(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
$(info install: install-runtime-target for $(target) enabled \
$(info install: android device attached) \
$(eval $(call DEF_ADB_DEVICE_STATUS, true))), \

View File

@ -123,7 +123,7 @@ endef
$(foreach target,$(CFG_TARGET_TRIPLES), \
$(if $(findstring $(target),"arm-linux-androideabi"), \
$(if $(findstring adb,$(CFG_ADB)), \
$(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
$(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
$(info check: $(target) test enabled \
$(info check: android device attached) \
$(eval $(call DEF_ADB_DEVICE_STATUS, true))), \

View File

@ -1309,11 +1309,11 @@ mod tests {
let output = str::from_bytes(prog.finish_with_output().output);
let r = os::env();
for &(k, v) in r.iter() {
for &(ref k, ref v) in r.iter() {
// don't check android RANDOM variables
if k != ~"RANDOM" {
assert!(output.contains(fmt!("%s=%s", k, v)) ||
output.contains(fmt!("%s=\'%s\'", k, v)));
if *k != ~"RANDOM" {
assert!(output.contains(fmt!("%s=%s", *k, *v)) ||
output.contains(fmt!("%s=\'%s\'", *k, *v)));
}
}
}