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

generate_html_report.sh: Support path without trailing slash #8

Merged
merged 3 commits into from
Jul 29, 2020

Conversation

Farigh
Copy link
Owner

@Farigh Farigh commented Jul 29, 2020

Passing a path without an ending slash could result in incorrect
index.html generation.

If the provided path does not end with a slash, it's now added.


Added the following related tests to the generate_html_outputs
test-suite:

  • relative_path_report(relative_path)
  • relative_path_report(relative_path_no_leading_slash)
  • relative_path_report(current_dir_in_path)
  • relative_path_report(current_dir_in_path_no_leading_slash)
  • relative_path_report(current_dir_out_path)
  • relative_path_report(current_dir_out_path_no_leading_slash)

This test-suite covers both relative paths and non-slash ending paths as
parameter values.

The special "." and ".." values are tested as well.


This commit fixes #7

@Farigh Farigh force-pushed the fixup-no-leading-slash-path branch 2 times, most recently from d9c7d49 to 5a05c16 Compare July 29, 2020 19:03
If the execution rights are not set properly, the run_tests.sh script
did not fail, even though the test-suite was never executed.

The execution rights are now checked before trying to run a test-suite.
If the check fails, an error is reported.
Passing a path without an ending slash could result in incorrect
index.html generation.

If the provided path does not end with a slash, it's now added.

---

Added the following related tests to the `generate_html_outputs`
test-suite:
  - relative_path_report(relative_path)
  - relative_path_report(relative_path_no_leading_slash)
  - relative_path_report(current_dir_in_path)
  - relative_path_report(current_dir_in_path_no_leading_slash)
  - relative_path_report(current_dir_out_path)
  - relative_path_report(current_dir_out_path_no_leading_slash)

This test-suite covers both relative paths and non-slash ending paths as
parameter values.

The special "." and ".." values are tested as well.

---

This commit fixes #7
@Farigh Farigh force-pushed the fixup-no-leading-slash-path branch 6 times, most recently from 4d27ce7 to 4c262aa Compare July 29, 2020 19:47
GitHub-CI does not run the tests in an interactive shell.
Thus colors are disabled.

Setting the memcheck_cover_always_use_colors variable to true will now
enable colors even within a non-interactive environnement.

This variable has been set to true if the GITHUB_RUN_ID is defined and
not empty for test scripts.
@Farigh Farigh force-pushed the fixup-no-leading-slash-path branch from 4c262aa to ea5b4ba Compare July 29, 2020 19:49
@Farigh Farigh merged commit d402ac2 into master Jul 29, 2020
@Farigh Farigh deleted the fixup-no-leading-slash-path branch July 29, 2020 19:58
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.

Incorrect generation while specifying an output-dir without a trailing slash
1 participant