Skip to content

Commit 57fdedc

Browse files
committed
Revise test util script
Fix bug in test: local path in reference output
1 parent a393fde commit 57fdedc

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

compiler/scripts/test-utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ echo_red()
1919
remove_path_prefix()
2020
{
2121
local_path_prefix=`cd ../../../..; echo $PWD`
22-
sed "s;$local_path_prefix;[ local path prefix ];"
22+
sed "s;$local_path_prefix;[ local path prefix ];g"
2323
}
2424

2525
# Run a test

compiler/tools/fpp-check/test/cycle_array.ref.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ fpp-check
33
array A = [3] B
44
^
55
error: encountered a use-def cycle:
6-
use B at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_array.fpp: 1.15 refers to definition B at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_array.fpp: 2.1
7-
use C at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_array.fpp: 2.15 refers to definition C at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_array.fpp: 3.1
8-
use A at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_array.fpp: 3.15 refers to definition A at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_array.fpp: 1.1
6+
use B at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_array.fpp: 1.15 refers to definition B at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_array.fpp: 2.1
7+
use C at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_array.fpp: 2.15 refers to definition C at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_array.fpp: 3.1
8+
use A at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_array.fpp: 3.15 refers to definition A at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_array.fpp: 1.1

compiler/tools/fpp-check/test/cycle_constant_1.ref.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ fpp-check
33
constant a = b
44
^
55
error: encountered a use-def cycle:
6-
use b at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_1.fpp: 1.14 refers to definition b at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_constant_1.fpp: 2.1
7-
use c at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_1.fpp: 2.14 refers to definition c at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_constant_1.fpp: 3.1
8-
use a at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_1.fpp: 3.14 refers to definition a at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_constant_1.fpp: 1.1
6+
use b at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_1.fpp: 1.14 refers to definition b at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_1.fpp: 2.1
7+
use c at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_1.fpp: 2.14 refers to definition c at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_1.fpp: 3.1
8+
use a at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_1.fpp: 3.14 refers to definition a at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_1.fpp: 1.1

compiler/tools/fpp-check/test/cycle_constant_2.ref.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ fpp-check
33
constant a = b
44
^
55
error: encountered a use-def cycle:
6-
use b at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_2.fpp: 3.16 refers to definition b at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_constant_2.fpp: 7.1
7-
use M.a at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_2.fpp: 7.14 refers to definition a at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_constant_2.fpp: 3.3
6+
use b at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_2.fpp: 3.16 refers to definition b at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_2.fpp: 7.1
7+
use M.a at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_2.fpp: 7.14 refers to definition a at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_constant_2.fpp: 3.3

compiler/tools/fpp-check/test/cycle_enum.ref.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ fpp-check
33
enum A: B { }
44
^
55
error: encountered a use-def cycle:
6-
use B at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum.fpp: 1.9 refers to definition B at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_enum.fpp: 2.1
7-
use C at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum.fpp: 2.9 refers to definition C at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_enum.fpp: 3.1
8-
use A at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum.fpp: 3.9 refers to definition A at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_enum.fpp: 1.1
6+
use B at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum.fpp: 1.9 refers to definition B at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum.fpp: 2.1
7+
use C at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum.fpp: 2.9 refers to definition C at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum.fpp: 3.1
8+
use A at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum.fpp: 3.9 refers to definition A at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum.fpp: 1.1

compiler/tools/fpp-check/test/cycle_enum_constant.ref.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ fpp-check
33
enum E { A = B, B = C, C = A }
44
^
55
error: encountered a use-def cycle:
6-
use B at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum_constant.fpp: 1.14 refers to definition B at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_enum_constant.fpp: 1.17
7-
use C at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum_constant.fpp: 1.21 refers to definition C at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_enum_constant.fpp: 1.24
8-
use A at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum_constant.fpp: 1.28 refers to definition A at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_enum_constant.fpp: 1.10
6+
use B at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum_constant.fpp: 1.14 refers to definition B at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum_constant.fpp: 1.17
7+
use C at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum_constant.fpp: 1.21 refers to definition C at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum_constant.fpp: 1.24
8+
use A at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum_constant.fpp: 1.28 refers to definition A at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_enum_constant.fpp: 1.10

compiler/tools/fpp-check/test/cycle_struct.ref.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ fpp-check
33
struct A { x: B }
44
^
55
error: encountered a use-def cycle:
6-
use B at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_struct.fpp: 1.15 refers to definition B at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_struct.fpp: 2.1
7-
use C at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_struct.fpp: 2.15 refers to definition C at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_struct.fpp: 3.1
8-
use A at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_struct.fpp: 3.15 refers to definition A at /Users/bocchino/JPL/Tools/fpp/compiler/tools/fpp-check/test/cycle_struct.fpp: 1.1
6+
use B at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_struct.fpp: 1.15 refers to definition B at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_struct.fpp: 2.1
7+
use C at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_struct.fpp: 2.15 refers to definition C at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_struct.fpp: 3.1
8+
use A at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_struct.fpp: 3.15 refers to definition A at [ local path prefix ]/compiler/tools/fpp-check/test/cycle_struct.fpp: 1.1

0 commit comments

Comments
 (0)