Skip to content

feat: add generic sync target for project results in Makefile#61

Merged
ianrwhitney merged 3 commits into
meshery:masterfrom
ianrwhitney:generic-result-sync
May 19, 2026
Merged

feat: add generic sync target for project results in Makefile#61
ianrwhitney merged 3 commits into
meshery:masterfrom
ianrwhitney:generic-result-sync

Conversation

@ianrwhitney
Copy link
Copy Markdown
Contributor

@ianrwhitney ianrwhitney commented May 17, 2026

This PR aims to add a generic sync results so that it can be leveraged in a resuable workflow and the various projects would provide the inputs to the make command. As the workflow that will leverage this is adopted, the previous cmd could be deprecated at that time.

example useage:
make project-results-sync RESULTS_DIR=./allure-results PROJECT=meshery

So as a reusable workflow the inputs would includes results-dir and project.

Signed-off-by: ianwhitney <ian.r.whitney@gmail.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a generic results-sync-path macro and a project-results-sync target to the Makefile for syncing test results. The review feedback correctly identifies a syntax error where spaces were used instead of tabs in the macro definition, which would cause the Makefile to fail. Additionally, suggestions were made to improve the robustness of the file copying process and variable quoting.

Comment thread Makefile Outdated
Signed-off-by: ianwhitney <ian.r.whitney@gmail.com>
@ianrwhitney ianrwhitney requested a review from Copilot May 18, 2026 00:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a generic Makefile target project-results-sync that accepts RESULTS_DIR and PROJECT inputs to enable reuse across projects in a shared workflow.

Changes:

  • New results-sync-path macro that copies results from a given source directory into <project>-results.
  • New project-results-sync target requiring RESULTS_DIR and PROJECT variables.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile
Comment on lines +69 to +70
exit 1; \
fi
Comment thread Makefile
Comment on lines +35 to +42
@rm -rf $(2)
@mkdir -p $(2)
@if [ -n "$(1)" ] && [ -d "$(1)" ]; then \
echo "Copying results from $(1) → $(2)"; \
cp -r "$(1)"/* $(2)/ ; \
else \
echo "$(1) not set or directory does not exist, skipping"; \
fi
Comment thread Makefile
@mkdir -p $(2)
@if [ -n "$(1)" ] && [ -d "$(1)" ]; then \
echo "Copying results from $(1) → $(2)"; \
cp -r "$(1)"/* $(2)/ ; \
Comment thread Makefile
Comment on lines +65 to +72
## Generic sync - make project-results-sync RESULTS_DIR=path/to/results PROJECT=myproject
project-results-sync:
@if [ -z "$(RESULTS_DIR)" ] || [ -z "$(PROJECT)" ]; then \
echo "RESULTS_DIR and PROJECT must be set"; \
exit 1; \
fi
@echo "Syncing $(PROJECT) results..."
$(call results-sync-path,$(RESULTS_DIR),$(PROJECT)-results)
Comment thread Makefile
Comment on lines +74 to 75


Comment thread Makefile



## Setup environment; Install prequisites
Copy link
Copy Markdown
Member

@aabidsofi19 aabidsofi19 left a comment

Choose a reason for hiding this comment

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

Looks good . should make it easier to extend the projects.

@ianrwhitney ianrwhitney merged commit e42bf19 into meshery:master May 19, 2026
3 checks passed
@ianrwhitney ianrwhitney deleted the generic-result-sync branch May 19, 2026 00:56
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