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

Fix unit test folder structure #203

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

mugdhadhole1
Copy link
Contributor

@mugdhadhole1 mugdhadhole1 commented Feb 12, 2025

Implemented fix in the folder structure for tests-unit folder.
Eliminated core folder.
Moved unit tests from tests-unit/core to tests-unit folder.

@mugdhadhole1 mugdhadhole1 added the internal Affects the CI, tests or refactorings only, not relevant to the end-user label Feb 12, 2025
@mugdhadhole1 mugdhadhole1 requested a review from a team as a code owner February 12, 2025 08:56
The folder "core" is eliminated and unit tests for report tools now exist in the "tests-unit" folder
@mugdhadhole1 mugdhadhole1 force-pushed the internal/fix-unit-test-folder-structure branch from 4827b58 to 08afa07 Compare February 12, 2025 09:36
@@ -161,8 +161,8 @@ code.lobster-%:
lobster-python --out code.lobster lobster/tools/$(TOOL_PATH)

unit-tests.lobster-%:
$(eval TOOL_PATH := $(subst -,/,$*))
lobster-python --activity --out unit-tests.lobster tests-unit/lobster-$(TOOL_PATH)
$(eval TOOL_NAME := $(subst _,-,$(notdir $(TOOL_PATH))))
Copy link
Member

Choose a reason for hiding this comment

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

Should it be TOOL_NAME instead of TOOL_PATH everywhere?

Suggested change
$(eval TOOL_NAME := $(subst _,-,$(notdir $(TOOL_PATH))))
$(eval TOOL_NAME := $(subst _,-,$(notdir $(TOOL_NAME))))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The TOOL_PATH variable contains the path of tools from lobster/tools/core folder as
core/ci_report
core/html_report
core/online_report
core/report

and it tries to find the tool in tests-unit folder as

core/lobster-ci_report
core/lobster-html_report
core/lobster-online_report
core/lobster-report

hence, this affects tracing reports, reports do not get generated.

So, I fetch the path from TOOL_PATH and then eliminate the "core/" part and replace "_" with "-"

The code gives the TOOL_NAME as

lobster-ci-report
lobster-html-report
lobster-online-report
lobster-report

and tracing reports then get generated successfully

@mugdhadhole1 mugdhadhole1 merged commit ee2c98a into main Feb 12, 2025
25 checks passed
@mugdhadhole1 mugdhadhole1 deleted the internal/fix-unit-test-folder-structure branch February 12, 2025 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Affects the CI, tests or refactorings only, not relevant to the end-user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants