unit-test: make "test -e" test independent of $CWD
The unit-test for hush's "test -e" currently relies upon being run in the U-Boot build directory, because it tests for the existence of a file that exists in that directory. Fix this by explicitly creating the file we use for the existence test, and deleting it afterwards so that multiple successive unit-test invocations succeed. This required adding an os.c function to erase files. Reported-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NStephen Warren <swarren@wwwdotorg.org>
Showing
想要评论请 注册 或 登录