Skip to content

Commit

Permalink
Merge pull request #529 from dgonyeo/tests
Browse files Browse the repository at this point in the history
Fix blackbox tests
  • Loading branch information
Derek Gonyeo authored Mar 21, 2018
2 parents 8d4cc46 + 814fa19 commit b100f31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions build_blackbox_tests
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,7 @@ done
for D in tests/stubs/*; do
if [ -d "${D}" ]; then
echo "Building ${D}"
if [ "$GOHOSTARCH" == "$GOARCH" ]; then
go install ${REPO_PATH}/${D}
else
# Don't try to go install things when cross compiling because
# go install disallows it.
go build ${REPO_PATH}/${D}
fi
go build -o ${BIN_PATH}/$(basename ${D}) ${REPO_PATH}/${D}
fi
done

Expand Down
4 changes: 2 additions & 2 deletions tests/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ func prepareRootPartitionForPasswd(t *testing.T, ctx context.Context, partitions
}

// TODO: use the architecture, not hardcode amd64
err := exec.CommandContext(ctx, "cp", "bin/amd64/id-stub", filepath.Join(mountPath, distro.IdCmd())).Run()
_, err := run(t, ctx, "cp", "bin/amd64/id-stub", filepath.Join(mountPath, distro.IdCmd()))
if err != nil {
return err
}
// TODO: needed for user_group_lookup.c
err = exec.CommandContext(ctx, "cp", "/lib64/libnss_files.so.2", filepath.Join(mountPath, "usr", "lib64")).Run()
_, err = run(t, ctx, "cp", "/lib64/libnss_files.so.2", filepath.Join(mountPath, "usr", "lib64"))
return err
}

Expand Down

0 comments on commit b100f31

Please sign in to comment.