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

Update references to SHA.txt -> SHAs.txt #670

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ tempTestTargetResult
failedtargets.mk
autoGenEnv.mk
buildInfo.mk
SHA.txt
SHAs.txt

.DS_Store

Expand Down
8 changes: 4 additions & 4 deletions scripts/getSHAs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ usage ()
echo 'Usage : '
echo ' --test_root_dir: optional'
echo ' --shas_file: optional, the file to write the sha info to. Default is to ../SHAs.txt'

}

parseCommandLineArgs()
Expand Down Expand Up @@ -50,8 +49,9 @@ parseCommandLineArgs()
fi
}

timestamp() {
date +"%Y%m%d-%H%M%S"
timestamp()
{
date +"%Y%m%d-%H%M%S"
}

getSHAs()
Expand All @@ -70,7 +70,7 @@ getSHAs()
{ echo "================================================"; echo "timestamp: $(timestamp)"; echo "repo dir: $repoDir"; echo "git repo: "; git remote show origin -n | grep "Fetch URL:"; echo "sha:"; git rev-parse HEAD; } 2>&1 | tee -a "$SHAs_FILE"
done
}

parseCommandLineArgs "$@"
getSHAs
cd "$workDIR" || exit

7 changes: 3 additions & 4 deletions scripts/getTestenvProperties.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@ OUTPUT_FILE="../testenv.properties"
REPO_NAME=""
REPO_SHA=""


usage ()
{
echo 'This script use git command to get sha in the provided REPO_DIR HEAD and write the info into the OUTPUT_FILE'
echo 'Usage : '
echo ' --repo_dir: local git repo dir'
echo ' --output_file: the file to write the sha info to. Default is to ../SHA.txt'
echo ' --output_file: the file to write the sha info to. Default is to ../SHAs.txt'
echo ' --repo_name: git repo name. It will be used as a parameter name in testenv.properties'
echo ' --repo_sha: git repo sha. If this value is not provided, use git command to get the repo sha. Otherwise, use the provided sha.'
echo ' USE_TESTENV_PROPERTIES: env variable. If set to false, regenerate testenv.properties to capture the repo and sha. Otherwise, do nothing. The existing testenv.properties file will be used.'
echo ' JDK_IMPL: env variable. Only used for openjdk tests. If JDK_IMPL = openj9, append OPENJ9 in REPO_NAME for openjdk repo . i.e., JDK11_OPENJ9. Otherwise, REPO_NAME is unchanged.'

}

parseCommandLineArgs()
Expand Down Expand Up @@ -62,7 +60,8 @@ parseCommandLineArgs()
fi
}

getTestenvProperties() {
getTestenvProperties()
{
if [[ "$USE_TESTENV_PROPERTIES" != true ]]; then
echo "Check sha in $REPO_DIR and store the info in $OUTPUT_FILE"
if [ ! -e ${OUTPUT_FILE} ]; then
Expand Down