File tree Expand file tree Collapse file tree 2 files changed +23
-14
lines changed
src/test/run-make/thumb-none-qemu Expand file tree Collapse file tree 2 files changed +23
-14
lines changed Original file line number Diff line number Diff line change 7
7
ifneq (,$(filter $(TARGET ) ,thumbv6m-none-eabi thumbv7m-none-eabi) )
8
8
9
9
# For cargo setting
10
- RUSTC := $(RUSTC_ORIGINAL )
10
+ export RUSTC := $(RUSTC_ORIGINAL )
11
11
LD_LIBRARY_PATH := $(HOST_RPATH_DIR )
12
12
# We need to be outside of 'src' dir in order to run cargo
13
- WORK_DIR := $(TMPDIR )
14
- HERE := $(shell pwd)
13
+ export WORK_DIR := $(TMPDIR )
14
+ export HERE := $(shell pwd)
15
15
16
16
17
17
# hint: we could set variables per $(TARGET) basis in order to support other targets.
18
- CRATE := cortex-m-rt
19
- CRATE_URL := https://github.com/rust-embedded/cortex-m-rt
20
- CRATE_SHA1 := 62972c8a89ff54b76f9ef0d600c1fcf7a233aabd
18
+ export CRATE := cortex-m-rt
19
+ export CRATE_URL := https://github.com/rust-embedded/cortex-m-rt
20
+ export CRATE_SHA1 := 62972c8a89ff54b76f9ef0d600c1fcf7a233aabd
21
21
22
22
all :
23
- env
24
- mkdir -p $(WORK_DIR )
25
- -cd $(WORK_DIR ) && rm -rf $(CRATE )
26
- cd $(WORK_DIR ) && bash -x $(HERE ) /../git_clone_sha1.sh $(CRATE ) $(CRATE_URL ) $(CRATE_SHA1 )
27
- cd $(WORK_DIR ) /$(CRATE ) && $(CARGO ) run --target $(TARGET ) --example qemu | grep " x = 42"
28
- cd $(WORK_DIR ) /$(CRATE ) && $(CARGO ) run --target $(TARGET ) --example qemu --release | grep " x = 42"
23
+ bash script.sh
29
24
else
30
-
31
25
all :
32
-
33
26
endif
Original file line number Diff line number Diff line change
1
+ set -exuo pipefail
2
+
3
+ CRATE=cortex-m-rt
4
+ CRATE_URL=https://github.com/rust-embedded/cortex-m-rt
5
+ CRATE_SHA1=62972c8a89ff54b76f9ef0d600c1fcf7a233aabd
6
+
7
+ env | sort
8
+ mkdir -p $WORK_DIR
9
+ pushd $WORK_DIR
10
+ rm -rf $CRATE || echo OK
11
+ bash -x $HERE /../git_clone_sha1.sh $CRATE $CRATE_URL $CRATE_SHA1
12
+ pushd $CRATE
13
+ $CARGO run --target $TARGET --example qemu | grep " x = 42"
14
+ $CARGO run --target $TARGET --example qemu --release | grep " x = 42"
15
+ popd
16
+ popd
You can’t perform that action at this time.
0 commit comments