Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If results dir already exists, do not try to create it #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pharazon
Copy link

No description provided.

@@ -27,7 +27,7 @@ date=`which gdate 2>/dev/null || which date`

# create output folder
juDIR=`pwd`/results
mkdir -p "$juDIR" || exit
test ! -e $juDIR && mkdir -p "$juDIR" || exit
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't mkdir -p create the folder only in the case it does not exist?

     -p      Create intermediate directories as required.  If this option is not specified, the full path prefix of each operand must already exist.  On the other hand, with this option
             specified, no error will be reported if a directory given as an operand already exists.  Intermediate directories are created with permission bits of rwxrwxrwx (0777) as mod-
             ified by the current umask, plus write and search permission for the owner.

@wiki5
Copy link

wiki5 commented Aug 30, 2024

Hi Manolo,
I am a desperate seeker for a solution :(

I am trying to use shjunit2 to generate test reports. I did several modifications to the file you have provided since it gave errors when trying to create log output. The modified code is as below.

sh2ju.txt

And my test code try to use the method in following manner

test-code.txt

When executing my test code exits with below error in the log output
`
Ran �[1;36m0�[0m tests.

�[1;32mOK�[0m
name is: tearDown
class is: default

+++ Running case: default.tearDown
+++ working dir: <>/tests/unit/tests
+++ command: sh -c "Tearing "down" "environment""
sh: line 1: Tearing: command not found
cat: <>/tests/unit/tests/results/evErr.9206.log: No such file or directory
`
Could you be kind enough to give some pointers on this?
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants