TKG icon indicating copy to clipboard operation
TKG copied to clipboard

Add test case for resultsSum.pl

Open llxia opened this issue 5 months ago • 1 comments

Entry point: https://github.com/adoptium/TKG/blob/master/scripts/testTKG/testRunner.py Example: https://github.com/adoptium/TKG/blob/master/scripts/testTKG/test_base.py Background info: testRunner.py can be triggered via github workflow https://github.com/adoptium/TKG/blob/58e40ba0d6563039c44f20b38adbfd4820faef7a/.github/workflows/testTKG.yml#L56

To add a test case for resultsSum.pl https://github.com/adoptium/TKG/blob/master/scripts/resultsSum.pl:

  • create new test_resultsSum.py under scripts/testTKG

  • command to run resultsSum.pl (please try to remove unnecessary parameters):

cd scripts;
./resultsSum.pl --failuremk=abc --platFile=../resources/buildPlatformMap.properties --diagnostic=failure --jdkVersion=11 --jdkImpl=openj9 --jdkVendor="eclipse" --spec=linux_aarch64 --buildList=functional --customTarget="" --testTarget=testList --tapPath=. --tapName=Grinder_abc.tap --comment="" --resultFile=<path to file>/regular.log
  • regular.log content (store it under scripts/testTKG/resultsSumTestData dir):
03:48:52.204  ===============================================
03:48:52.204  Running test floatSanityTests_2 ...
03:48:52.204  ===============================================
03:48:52.204  floatSanityTests_2 Start Time: Thu Jul 17 05:45:39 2025 Epoch Time (ms): 1752731139515
03:48:52.204  variation: Mode150
03:48:52.204  JVM_OPTIONS:  -XX:+UseCompressedOops 
03:48:52.204  { \
03:48:52.204  echo "";	echo "TEST SETUP:"; \
03:48:52.204  "/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/jdkbinary/j2sdk-image/bin/java" -Xshareclasses:destroyAll; "/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/jdkbinary/j2sdk-image/bin/java" -Xshareclasses:groupAccess,destroyAll; echo "cache cleanup done"; \
03:48:52.204  mkdir -p "/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/aqa-tests/TKG/../TKG/output_17527257655012/floatSanityTests_2"; \
03:48:52.204  cd "/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/aqa-tests/TKG/../TKG/output_17527257655012/floatSanityTests_2"; \
03:48:52.204  echo "";	echo "TESTING:"; \
03:48:52.204  "/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/jdkbinary/j2sdk-image/bin/java"  -XX:+UseCompressedOops  \
03:48:52.204  -cp "/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/aqa-tests/TKG/../../jvmtest/TestConfig/resources:/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/../../testDependency/lib/testng.jar:/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/../../testDependency/lib/jcommander.jar:/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/aqa-tests/TKG/../../jvmtest/functional/Java8andUp/GeneralTest.jar" \
03:48:52.204  org.testng.TestNG -d "/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/aqa-tests/TKG/../TKG/output_17527257655012/floatSanityTests_2" "/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/aqa-tests/TKG/../../jvmtest/functional/Java8andUp/testng.xml" \
03:48:52.204  -testnames floatSanityTests \
03:48:52.204  -groups level.sanity \
03:48:52.204  -excludegroups d.*.linux_aarch64,d.*.arch.aarch,d.*.os.linux,d.*.bits.64,d.*.generic-all; \
03:48:52.204  if [ $? -eq 0 ]; then echo "-----------------------------------"; echo "floatSanityTests_2""_PASSED"; echo "-----------------------------------"; cd /home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/aqa-tests/TKG/..; rm -f -r "/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/aqa-tests/TKG/../TKG/output_17527257655012/floatSanityTests_2"; else echo "-----------------------------------"; echo "floatSanityTests_2""_FAILED"; echo "-----------------------------------"; fi; \
03:48:52.204  echo "";	echo "TEST TEARDOWN:"; \
03:48:52.204  "/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/jdkbinary/j2sdk-image/bin/java" -Xshareclasses:destroyAll; "/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/jdkbinary/j2sdk-image/bin/java" -Xshareclasses:groupAccess,destroyAll; echo "cache cleanup done"; \
03:48:52.204   } 2>&1 | tee -a "/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/aqa-tests/TKG/../TKG/output_17527257655012/TestTargetResult";
03:48:52.204  
03:48:52.204  TEST SETUP:
03:48:52.204  JVMSHRC005I No shared class caches available
03:48:52.461  JVMSHRC005I No shared class caches available
03:48:52.461  cache cleanup done
03:48:52.461  
03:48:52.461  TESTING:
03:48:53.397  [IncludeExcludeTestAnnotationTransformer] [INFO] EXCLUDE_FILE environment variable: /home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/aqa-tests/TKG/../TestConfig/resources/excludes/latest_exclude_11.txt
03:48:53.397  [IncludeExcludeTestAnnotationTransformer] [INFO] Processing exclude file: /home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_aarch64_linux_Nightly_testList_0/aqa-tests/TKG/../TestConfig/resources/excludes/latest_exclude_11.txt
03:48:53.397  ...
03:48:53.397  ... TestNG 6.14.2 by Cédric Beust ([email protected])
03:48:53.397  ...
03:48:53.397  
03:48:54.799  PASSED: ulpAcosTest
03:48:54.799  PASSED: float_zero_times_pos
03:48:54.799  
03:48:54.799  ===============================================
03:48:54.799      floatSanityTests
03:48:54.799      Tests run: 128, Failures: 0, Skips: 0
03:48:54.799  ===============================================
03:48:54.799  
03:48:54.799  
03:48:54.799  ===============================================
03:48:54.799  GeneralTest suite
03:48:54.799  Total tests run: 128, Failures: 0, Skips: 0
03:48:54.799  ===============================================
03:48:54.799  
03:48:55.063  -----------------------------------
03:48:55.063  floatSanityTests_2_PASSED
03:48:55.063  -----------------------------------
03:48:55.063  
03:48:55.063  TEST TEARDOWN:
03:48:55.327  
03:48:55.327  Attempting to destroy all caches in cacheDir /home/jenkins/.cache/javasharedresources/
03:48:55.327  
03:48:55.327  JVMSHRC806I Compressed references persistent shared cache "sharedcc_jenkins" has been destroyed. Use option -Xnocompressedrefs if you want to destroy a non-compressed references cache.
03:48:55.327  JVMSHRC005I No shared class caches available
03:48:55.327  cache cleanup done
03:48:55.327  floatSanityTests_2 Finish Time: Thu Jul 17 05:45:42 2025 Epoch Time (ms): 1752731142456
03:48:55.327  
  • expected output:
TEST TARGETS SUMMARY
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PASSED test targets:
	floatSanityTests_2

 TOTAL: 1   EXECUTED: 1   PASSED: 0   FAILED: 1   DISABLED: 0   SKIPPED: 0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

llxia avatar Jul 17 '25 19:07 llxia

Hi, can I work on this?

MattyWeee123 avatar Jul 17 '25 19:07 MattyWeee123