go(algo_test): do test separation, proper clean-up
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
18d022c851
commit
d397137cfc
@ -22,7 +22,7 @@ func TestDoRandomSearchExec(t *testing.T) {
|
||||
|
||||
wg.Wait()
|
||||
|
||||
picsDir := report.GetPicsDir()
|
||||
picsDir := report.GetPicsDir() + "-test-rs"
|
||||
|
||||
if err := os.RemoveAll(picsDir); err != nil {
|
||||
t.Error(err)
|
||||
@ -33,6 +33,11 @@ func TestDoRandomSearchExec(t *testing.T) {
|
||||
if _, err := os.Stat(picsDir); err == nil {
|
||||
t.Error("picsDir should have already been cleaned up")
|
||||
}
|
||||
|
||||
// clean up outdir.
|
||||
if err := os.RemoveAll("out"); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDoSHCExec(t *testing.T) {
|
||||
@ -42,7 +47,7 @@ func TestDoSHCExec(t *testing.T) {
|
||||
|
||||
wg.Wait()
|
||||
|
||||
picsDir := report.GetPicsDir()
|
||||
picsDir := report.GetPicsDir() + "-test-shc"
|
||||
|
||||
if err := os.RemoveAll(picsDir); err != nil {
|
||||
t.Error(err)
|
||||
@ -53,4 +58,9 @@ func TestDoSHCExec(t *testing.T) {
|
||||
if _, err := os.Stat(picsDir); err == nil {
|
||||
t.Error("picsDir should have already been cleaned up")
|
||||
}
|
||||
|
||||
// clean up outdir.
|
||||
if err := os.RemoveAll("out"); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user