fix CI: skip metadata tests when test_data is absent, use fmt.Fprintf in genevents
This commit is contained in:
@@ -134,7 +134,7 @@ func generateTypeScript(groups []constGroup) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, c := range g.Consts {
|
for _, c := range g.Consts {
|
||||||
b.WriteString(fmt.Sprintf(" %s: %q,\n", c.Name, c.Value))
|
fmt.Fprintf(&b, " %s: %q,\n", c.Name, c.Value)
|
||||||
}
|
}
|
||||||
// Blank line between groups, but not after the last one.
|
// Blank line between groups, but not after the last one.
|
||||||
if i < len(groups)-1 {
|
if i < len(groups)-1 {
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ func testFlacFiles(t *testing.T) []string {
|
|||||||
|
|
||||||
root := filepath.Join("..", "..", "test_data")
|
root := filepath.Join("..", "..", "test_data")
|
||||||
|
|
||||||
|
if _, err := os.Stat(root); os.IsNotExist(err) {
|
||||||
|
t.Skip("test_data directory not present, skipping")
|
||||||
|
}
|
||||||
|
|
||||||
var files []string
|
var files []string
|
||||||
|
|
||||||
err := filepath.Walk(root, func(
|
err := filepath.Walk(root, func(
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ func testMP3Files(t *testing.T) []string {
|
|||||||
|
|
||||||
root := filepath.Join("..", "..", "test_data")
|
root := filepath.Join("..", "..", "test_data")
|
||||||
|
|
||||||
|
if _, err := os.Stat(root); os.IsNotExist(err) {
|
||||||
|
t.Skip("test_data directory not present, skipping")
|
||||||
|
}
|
||||||
|
|
||||||
var files []string
|
var files []string
|
||||||
|
|
||||||
err := filepath.Walk(root, func(
|
err := filepath.Walk(root, func(
|
||||||
|
|||||||
Reference in New Issue
Block a user