mirror of
https://github.com/go-task/task.git
synced 2025-06-23 00:38:19 +02:00
fix(checker): use only one checker at the same time to improve perf (#2031)
* fix(checker): use only one checker at the same time to improve performance * refactor * fix test
This commit is contained in:
@ -969,10 +969,13 @@ func TestStatusVariables(t *testing.T) {
|
||||
Verbose: true,
|
||||
}
|
||||
require.NoError(t, e.Setup())
|
||||
require.NoError(t, e.Run(context.Background(), &ast.Call{Task: "build"}))
|
||||
require.NoError(t, e.Run(context.Background(), &ast.Call{Task: "build-checksum"}))
|
||||
|
||||
assert.Contains(t, buff.String(), "3e464c4b03f4b65d740e1e130d4d108a")
|
||||
|
||||
buff.Reset()
|
||||
require.NoError(t, e.Run(context.Background(), &ast.Call{Task: "build-ts"}))
|
||||
|
||||
inf, err := os.Stat(filepathext.SmartJoin(dir, "source.txt"))
|
||||
require.NoError(t, err)
|
||||
ts := fmt.Sprintf("%d", inf.ModTime().Unix())
|
||||
@ -1002,10 +1005,12 @@ func TestCmdsVariables(t *testing.T) {
|
||||
Verbose: true,
|
||||
}
|
||||
require.NoError(t, e.Setup())
|
||||
require.NoError(t, e.Run(context.Background(), &ast.Call{Task: "build"}))
|
||||
require.NoError(t, e.Run(context.Background(), &ast.Call{Task: "build-checksum"}))
|
||||
|
||||
assert.Contains(t, buff.String(), "3e464c4b03f4b65d740e1e130d4d108a")
|
||||
|
||||
buff.Reset()
|
||||
require.NoError(t, e.Run(context.Background(), &ast.Call{Task: "build-ts"}))
|
||||
inf, err := os.Stat(filepathext.SmartJoin(dir, "source.txt"))
|
||||
require.NoError(t, err)
|
||||
ts := fmt.Sprintf("%d", inf.ModTime().Unix())
|
||||
|
Reference in New Issue
Block a user