Skip to content
Snippets Groups Projects
Commit 4c88dcb2 authored by Martyn Welch's avatar Martyn Welch
Browse files

Merge branch 'T4802' into 'master'

Correct handling of missing .bash_history

See merge request tests/common!3
parents 592faf40 d975ebb0
No related branches found
No related tags found
No related merge requests found
......@@ -60,8 +60,9 @@ TEST_TITLE=$( basename ${EXPECT_FILE} )
# Touch .bash_history, which we use in some tests, if it's not there.
bash_history="/home/${CHAIWALA_USER}/.bash_history"
if [ ! -r ${bash_history} ]; then
RET=$( sudo -u ${CHAIWALA_USER} touch ${bash_history} )
if [ $RET != 0 ]; then
sudo -u ${CHAIWALA_USER} touch ${bash_history}
RET=$?
if [ "$RET" != "0" ]; then
echo "Failed to create .bash_history: $RET"
exit 1
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment