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

Issues with paths including spaces in #1

Closed
ireicht opened this issue Aug 30, 2016 · 1 comment
Closed

Issues with paths including spaces in #1

ireicht opened this issue Aug 30, 2016 · 1 comment

Comments

@ireicht
Copy link
Contributor

ireicht commented Aug 30, 2016

Dear Shadowfen,

when testing jshu on my Ubuntu16.1LTS system, I figured some issues:

  1. When path to the script contains spaces, then no test-results are produced. This is due to missing quotes in the "$test_file" variable in jshuFinalize() (here a diff of jshutest.inc):

- echo "\<testsuite failures ... "${total}\">" >${test_file}
- cat $jshu_content_file >>$test_file
- echo "\</testsuite>" >>$test_file
+ echo "\<testsuite failures ... "${total}\">" >"${test_file}"
+ cat $jshu_content_file >>"$test_file"
+ echo "</testsuite>" >>"$test_file"

  1. Also in function jshuRunTests():215, spaces in the path are not interpreted correctly by the command cd ${_jshu_run_curdir}

quotes fixed this issue (see diff):
- cd ${_jshu_run_curdir}
+ cd "${_jshu_run_curdir}"

  1. A Segmentation-Fault is caused when executing the incrbuild_unitTest.sh. This is most likely due to the function parseVersion(). This function is supposed to call function in parseVersion() from sourced script increment_build.sh. However it ends up in an "infinite" recursion. Renaming incrbuild_unitTest.sh::parseVersion() to incrbuild_unitTest.sh::parseVersion_Test() solved the issue. If so, then also update content of jshuTestFunctions="parseVersion getBldFileName_noParam" to jshuTestFunctions="parseVersion_Test getBldFileName_noParam"

regards ireicht

Shadowfen pushed a commit that referenced this issue Aug 31, 2016
Fix issue for causing segmentation fault in parseVersion()
@Shadowfen
Copy link
Owner

Thank you for the patches. I modified the incrbuild_unitTest.sh patch because renaming the parseVersion() function to parseVersionTest() made the function name match the discovery pattern so that it would run once because it was listed in the jshuTestFunctions variable and then a second time because it was automatically discovered as a test function to be executed.

Your modifications have been released in build 17. Thanks again.

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

No branches or pull requests

2 participants