-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
xgo.bats
57 lines (49 loc) · 1.73 KB
/
xgo.bats
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env bats
@test "embedded c" {
export GO111MODULE=auto
run go run xgo.go --image="${IMAGEID}" ./tests/embedded_c
echo "$output"
[ "$status" -eq 0 ]
}
@test "embedded cpp" {
run go run xgo.go --image="${IMAGEID}" ./tests/embedded_cpp
echo "$output"
[ "$status" -eq 0 ]
}
@test "has mod" {
skip "this test doesn't yet exist"
run go run xgo.go --image="${IMAGEID}" src.techknowlogick.com/xgo/tests/hasmod
[ "$status" -eq 0 ]
}
@test "has mod and vendor" {
skip "this test doesn't yet exist"
run go run xgo.go --image="${IMAGEID}" src.techknowlogick.com/xgo/tests/hasmodandvendor
[ "$status" -eq 0 ]
}
# FIXME: does not work, see https://github.com/techknowlogick/xgo/issues/260
#@test "branches" {
# run go run xgo.go --remote https://github.com/rwcarlsen/cyan --branch memprof --targets "linux/amd64" --image="${IMAGEID}" github.com/rwcarlsen/cyan/cmd/cyan
# echo "$output"
# [ "$status" -eq 0 ]
#}
@test "eth smoke" {
git clone --depth 1 https://github.com/ethereum/go-ethereum.git /tmp/eth
run go run xgo.go --targets "linux/amd64" --image="${IMAGEID}" /tmp/eth/cmd/geth
echo "$output"
[ "$status" -eq 0 ]
}
@test "gitea smoke" {
git clone --depth 1 https://github.com/go-gitea/gitea.git /tmp/gitea
run go run xgo.go --image="${IMAGEID}" --targets "darwin-10.6/amd64" -tags 'netgo osusergo sqlite sqlite_unlock_notify' /tmp/gitea
echo "$output"
[ "$status" -eq 0 ]
}
@test "vikunja smoke" {
export vikunja_path=/tmp/vikunja
git clone --depth 1 https://kolaente.dev/vikunja/api $vikunja_path
mkdir -p $vikunja_path/frontend/dist/
touch $vikunja_path/frontend/dist/index.html
run go run xgo.go --image="${IMAGEID}" --targets "darwin-10.6/amd64" $vikunja_path
echo "$output"
[ "$status" -eq 0 ]
}