File tree 4 files changed +36
-13
lines changed
4 files changed +36
-13
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ tests/compat/*.bin
2
2
tests /compat /* .elf
3
3
tests /compat /* .o
4
4
tests /compat /* .ulp
5
+ tests /compat /* .log
5
6
.DS_Store
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ script:
14
14
15
15
# ##### Install tools ######
16
16
17
+ - echo -e "travis_fold:start:build_micropython"
17
18
- echo "Building micropython"
18
19
- git clone --recursive https://github.com/micropython/micropython.git
19
20
- pushd micropython/ports/unix
@@ -23,7 +24,9 @@ script:
23
24
- export PATH=$PATH:$PWD
24
25
- test $(micropython -c 'print("test")') = "test"
25
26
- popd
27
+ - echo -e "travis_fold:end:build_micropython"
26
28
29
+ - echo -e "travis_fold:start:build_binutils"
27
30
- echo "Building binutils-esp32ulp"
28
31
- git clone https://github.com/espressif/binutils-esp32ulp.git
29
32
- pushd binutils-esp32ulp
@@ -35,9 +38,17 @@ script:
35
38
- export PATH=$PATH:$PWD/dist/bin
36
39
- esp32ulp-elf-as --version | grep 'esp32ulp-elf' > /dev/null
37
40
- popd
41
+ - echo -e "travis_fold:end:build_binutils"
38
42
39
43
# ##### Run tests ######
40
44
41
45
- pushd tests
42
- - ./00_run_tests.sh
46
+
47
+ - echo -e "travis_fold:start:unit_tests"
48
+ - ./00_unit_tests.sh
49
+ - echo -e "travis_fold:end:unit_tests"
50
+
51
+ - echo -e "travis_fold:start:compat_tests"
52
+ - ./01_compat_tests.sh
53
+ - echo -e "travis_fold:end:compat_tests"
43
54
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # export PYTHONPATH=.:$PYTHONPATH
4
+
5
+ set -e
6
+
7
+ for file in opcodes assemble link ; do
8
+ echo testing $file ...
9
+ micropython $file .py
10
+ done
Original file line number Diff line number Diff line change 4
4
5
5
set -e
6
6
7
- for file in opcodes assemble link ; do
8
- echo testing $file ...
9
- micropython $file .py
10
- done
11
-
12
7
for src_file in $( ls -1 compat/* .S) ; do
13
8
src_name=" ${src_file% .S} "
14
9
15
- echo " Building $src_file using py-esp32-ulp"
10
+ echo " Testing $src_file "
11
+ echo -e " \tBuilding using py-esp32-ulp"
16
12
ulp_file=" ${src_name} .ulp"
17
- micropython -m esp32_ulp $src_file # generates $ulp_file
13
+ log_file=" ${src_name} .log"
14
+ micropython -m esp32_ulp $src_file 1> $log_file # generates $ulp_file
18
15
19
16
obj_file=" ${src_name} .o"
20
17
elf_file=" ${src_name} .elf"
21
18
bin_file=" ${src_name} .bin"
22
19
23
- echo " Building $src_file using binutils"
20
+ echo -e " \tBuilding using binutils"
24
21
esp32ulp-elf-as -o $obj_file $src_file
25
22
esp32ulp-elf-ld -T esp32.ulp.ld -o $elf_file $obj_file
26
23
esp32ulp-elf-objcopy -O binary $elf_file $bin_file
27
24
28
- if ! diff $ulp_file $bin_file ; then
25
+ if ! diff $ulp_file $bin_file 1> /dev/null; then
26
+ echo -e " \tBuild outputs differ!"
27
+ echo " "
29
28
echo " Compatibility test failed for $src_file "
29
+ echo " py-esp32-ulp log:"
30
+ cat $log_file
30
31
echo " py-esp32-ulp output:"
31
- hexdump $ulp_file
32
+ xxd -e $ulp_file
32
33
echo " binutils output:"
33
- hexdump $bin_file
34
+ xxd -e $bin_file
34
35
exit 1
35
36
else
36
- echo " Build outputs match for $src_file "
37
+ echo -e " \tBuild outputs match"
37
38
fi
38
39
done
You can’t perform that action at this time.
0 commit comments