Skip to content

Commit e31ea8e

Browse files
committed
update Makefile
1 parent 2b96fa9 commit e31ea8e

File tree

1 file changed

+16
-24
lines changed

1 file changed

+16
-24
lines changed

test.sh

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,20 @@
44
set -e
55
echo "" > coverage.txt
66

7-
function test_lcof(){
8-
test_dir="lcof"
9-
echo "Test Dir ${test_dir}"
10-
go clean -testcache
11-
go test -coverprofile=profile.out -covermode=atomic -parallel 16 -p 16 ./$test_dir/*
12-
}
13-
function test_leetcode(){
14-
go clean -testcache
15-
test_dir="leetcode"
16-
echo "Test Dir ${test_dir}"
17-
for d in $(ls $test_dir); do
18-
{
19-
echo $d
20-
go test -coverprofile=profile.out -covermode=atomic -parallel 16 -p 16 ./$test_dir/$d/*
21-
if [ -f profile.out ]; then
22-
cat profile.out >> coverage.txt
23-
rm profile.out
24-
fi
25-
} &
26-
done
27-
wait
28-
}
7+
test_dir="lcof"
8+
echo "Test Dir ${test_dir}"
9+
go clean -testcache
10+
go test -coverprofile=profile.out -covermode=atomic -parallel 16 -p 16 ./$test_dir/*
2911

30-
test_lcof
31-
test_leetcode
12+
test_dir="leetcode"
13+
echo "Test Dir ${test_dir}"
14+
for d in $(ls $test_dir); do
15+
{
16+
go test -coverprofile=profile.out -covermode=atomic -parallel 16 -p 16 ./$test_dir/$d/*
17+
if [ -f profile.out ]; then
18+
cat profile.out >> coverage.txt
19+
rm profile.out
20+
fi
21+
} &
22+
done
23+
wait

0 commit comments

Comments
 (0)