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

Incorrect generation while specifying an output-dir without a trailing slash #7

Closed
Farigh opened this issue Jul 29, 2020 · 0 comments · Fixed by #8
Closed

Incorrect generation while specifying an output-dir without a trailing slash #7

Farigh opened this issue Jul 29, 2020 · 0 comments · Fixed by #8
Labels
bug Something isn't working
Milestone

Comments

@Farigh
Copy link
Owner

Farigh commented Jul 29, 2020

While using generate_html_report.sh with --output-dir=. --input-dir=report, the resulting output is as follows:

./
├── report/
│   ├── memcheck-cover.css
│   ├── memcheck-cover.js
│   ├── my-exec.memcheck.html.part
│   └── subdir/
│       └── another-exec.memcheck.html.part
├── reportindex.html                               <--- incorrect
├── my-exec.memcheck
└── subdir/
    └── another-exec.memcheck

expected output:

./
├── report/
│   ├── index.html
│   ├── memcheck-cover.css
│   ├── memcheck-cover.js
│   ├── my-exec.memcheck.html.part
│   └── subdir/
│       └── another-exec.memcheck.html.part
├── my-exec.memcheck
└── subdir/
    └── another-exec.memcheck

The index.html content is not correct either:

    <head>
        <meta charset="utf-8" />
        <link rel="stylesheet" type="text/css" href="memcheck-cover.css">
        <script type="text/javascript" src="memcheck-cover.js"></script>

        <!-- Valgrind reports asynchronous loading parts -->
        <script src="/my-exec.memcheck.html.part" async="async"></script> <!-- Extra slash at the beginning of the path -->
        <script src="/subdir/another-exec.memcheck.html.part" async="async"></script>
    </head>

expected:

    <head>
        <meta charset="utf-8" />
        <link rel="stylesheet" type="text/css" href="memcheck-cover.css">
        <script type="text/javascript" src="memcheck-cover.js"></script>

        <!-- Valgrind reports asynchronous loading parts -->
        <script src="my-exec.memcheck.html.part" async="async"></script>
        <script src="subdir/another-exec.memcheck.html.part" async="async"></script>
    </head>

Note: Using --output-dir=./ works fine

@Farigh Farigh added the bug Something isn't working label Jul 29, 2020
@Farigh Farigh self-assigned this Jul 29, 2020
@Farigh Farigh added this to the v1.1 milestone Jul 29, 2020
Farigh added a commit that referenced this issue 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 related `relative_path_report` test to the
`generate_html_outputs` test-suite.

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

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

---

This commit fixes #7
Farigh added a commit that referenced this issue 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 added a commit that referenced this issue 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 closed this as completed in #8 Jul 29, 2020
Farigh added a commit that referenced this issue 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 removed their assignment Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant