-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathgen_test.go
More file actions
44 lines (37 loc) · 852 Bytes
/
gen_test.go
File metadata and controls
44 lines (37 loc) · 852 Bytes
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
// gen_test.go - scaffolding to generate protobuf code as needed
//
// (c) 2016 Sudhi Herle <sudhi@herle.net>
//
// Licensing Terms: GPLv2
//
// If you need a commercial license for this work, please contact
// the author.
//
// This software does not come with any express or implied
// warranty; it is provided "as is". No claim is made to its
// suitability for any purpose.
//
package sigtool
import (
"fmt"
"os"
"os/exec"
"testing"
)
const _Script = "./gen-proto.sh"
// XXX This only works on Unix-like platforms.
//
// TODO Add support for windows. Gah.
func TestMain(m *testing.M) {
cmd := exec.Command(_Script)
cmd.Dir = "."
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {
fmt.Fprintf(os.Stderr, "\n%s: %s\n", _Script, err)
os.Exit(1)
}
os.Exit(m.Run())
}
func TestEmpty(t *testing.T) {
}