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

added the if statement #5341

Closed
wants to merge 2 commits into from
Closed

Conversation

Hana3706
Copy link

solved the issue #5297
add a if statement

makeTestCmd = "$RESOLVED_MAKE;cd ./aqa-tests; . ./scripts/testenv/testenvSettings.sh;cd ./TKG; \$MAKE $testParam"
}else{
makeTestCmd = "$RESOLVED_MAKE";cd. /aqa-tests; cd .TKG; \$MAKE $testParam"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

DYNAMIC_COMPILE is a boolean, not a string. Please change the code to the following:

String makeTestCmd = "$RESOLVED_MAKE";cd. /aqa-tests/TKG; \$MAKE $testParam"
if (env.DYNAMIC_COMPILE) {
   makeTestCmd = "$RESOLVED_MAKE;cd ./aqa-tests; . ./scripts/testenv/testenvSettings.sh;cd ./TKG; \$MAKE $testParam"
}

Copy link
Contributor

Choose a reason for hiding this comment

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

please remove else

@llxia
Copy link
Contributor

llxia commented May 21, 2024

Hana3706 added a commit to Hana3706/aqa-tests that referenced this pull request Jun 4, 2024
Hana3706 added a commit to Hana3706/aqa-tests that referenced this pull request Jun 4, 2024
@Hana3706
Copy link
Author

Hana3706 commented Jun 4, 2024

testenvSettings.sh should run only once

All four commits do the same thing, was a git mistake on my side

Fixed #5297 and #5341

signed-off-by: Hana [email protected]

@llxia
Copy link
Contributor

llxia commented Jun 4, 2024

Thanks @Hana3706 for the update. However, the code does not match the suggested #5341 (comment)
Also, please do not include other changes that are unrelated to this issue. Thanks

@Hana3706
Copy link
Author

Hana3706 commented Jun 4, 2024

@llxia am so sorry for this but can you point out to me how it doesn't match the code bcs on my local computer the code is updated to match the suggested changes, perhaps there was an issue with the version I commit...

@LongyuZhang
Copy link
Contributor

Hi @Hana3706 Usually you can rebase to keep the PR up-to-date with the upstream repo. For your current case, it might be easier to create a new branch with the following steps:

  • make a copy of current branch (git checkout -b <new_branch_1>)
  • checkout your master branch, fetch upstream, then rebase it to the latest
  • Delete your current branch my_new_branch locally, then re-create new my_new_branch from master
  • Make the changes (you can refer previous copied branch <new_branch_1>), commit and force push, then this PR will be updated.

@Hana3706
Copy link
Author

Hana3706 commented Jun 4, 2024

@LongyuZhang thanks a lot for the feedback!
I was just wondering why I need to create a new branch? As well as that, I want to better understand what is wrong with the update I made so I can fix it again.
Finally, how do I rebase to the latest branch upstream and how do I delete a branch locally...
am so sorry for the many questions :)
thanks again!

@LongyuZhang
Copy link
Contributor

@Hana3706 If you can rebase on the currently branch, it would be great. I suggested re-create new branch since you commits may already mixed with merged commits. So feel free to try rebase on this branch first.
Regarding the rebase, you can follow https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-repository-for-a-fork to add adoptium/aqa-tests as the upstream, fetch it to your local, then use git rebase upstream/master command to update your branch.

@@ -6,7 +6,10 @@ import org.tap4j.model.TestSet;
def makeTest(testParam) {
String tearDownCmd = "$RESOLVED_MAKE; \$MAKE -f ./aqa-tests/TKG/testEnv.mk testEnvTeardown"
// Note: keyword source cannot be used in Jenkins script. Therefore, using "." instead.
String makeTestCmd = "$RESOLVED_MAKE;cd ./aqa-tests; . ./scripts/testenv/testenvSettings.sh;cd ./TKG; \$MAKE $testParam"
String makeTestCmd = "$RESOLVED_MAKE";cd. /aqa-tests/TKG; \$MAKE $testParam"
Copy link
Contributor

Choose a reason for hiding this comment

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

the cd. should be cd .

@@ -6,7 +6,10 @@ import org.tap4j.model.TestSet;
def makeTest(testParam) {
String tearDownCmd = "$RESOLVED_MAKE; \$MAKE -f ./aqa-tests/TKG/testEnv.mk testEnvTeardown"
// Note: keyword source cannot be used in Jenkins script. Therefore, using "." instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment should be moved into the if block too

Copy link
Author

Choose a reason for hiding this comment

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

To make sure, do you want me to move the import otf.tap4j.model.TestSet comment inside my if statement on line 10 or before it on line 9?

Copy link
Contributor

Choose a reason for hiding this comment

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

This comment // Note: keyword source cannot be used in Jenkins script. Therefore, using "." instead. is for makeTestCmd = "$RESOLVED_MAKE;cd ./aqa-tests; . ./scripts/testenv/testenvSettings.sh;cd ./TKG; \$MAKE $testParam", so they should be together.

Comment on lines +10 to +12
if (env.DYNAMIC_COMPILE){
makeTestCmd = "$RESOLVED_MAKE;cd ./aqa-tests; . ./scripts/testenv/testenvSettings.sh;cd ./TKG; \$MAKE $testParam"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (env.DYNAMIC_COMPILE){
makeTestCmd = "$RESOLVED_MAKE;cd ./aqa-tests; . ./scripts/testenv/testenvSettings.sh;cd ./TKG; \$MAKE $testParam"
}
if (env.DYNAMIC_COMPILE){
// Note: keyword source cannot be used in Jenkins script. Therefore, using "." instead.
makeTestCmd = "$RESOLVED_MAKE;cd ./aqa-tests; . ./scripts/testenv/testenvSettings.sh;cd ./TKG; \$MAKE $testParam"
}

@@ -6,7 +6,10 @@ import org.tap4j.model.TestSet;
def makeTest(testParam) {
String tearDownCmd = "$RESOLVED_MAKE; \$MAKE -f ./aqa-tests/TKG/testEnv.mk testEnvTeardown"
// Note: keyword source cannot be used in Jenkins script. Therefore, using "." instead.
String makeTestCmd = "$RESOLVED_MAKE;cd ./aqa-tests; . ./scripts/testenv/testenvSettings.sh;cd ./TKG; \$MAKE $testParam"
String makeTestCmd = "$RESOLVED_MAKE";cd. /aqa-tests/TKG; \$MAKE $testParam"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
String makeTestCmd = "$RESOLVED_MAKE";cd. /aqa-tests/TKG; \$MAKE $testParam"
String makeTestCmd = "$RESOLVED_MAKE";cd ./aqa-tests/TKG; \$MAKE $testParam"

@llxia
Copy link
Contributor

llxia commented Jul 28, 2024

@Hana3706 are you still working on this PR? If so, please address the above comments. Thanks

@smlambert
Copy link
Contributor

Closing as stale. Reopen if requested updates are made.

@smlambert smlambert closed this Sep 25, 2024
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.

4 participants