@@ -384,6 +384,167 @@ jobs:
384384 path : ~/linux-x64${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip
385385 continue-on-error : true
386386
387+ linux_x64_test_fips :
388+ name : Linux x64 + FIPS
389+ runs-on : " ubuntu-20.04"
390+ needs :
391+ - prerequisites
392+ - linux_x64_build
393+
394+ strategy :
395+ fail-fast : false
396+ matrix :
397+ test :
398+ - jdk/tier1 part 1
399+ - jdk/tier1 part 2
400+ - jdk/tier1 part 3
401+ include :
402+ - test : jdk/tier1 part 1
403+ suites : test/jdk/:tier1_part1
404+ - test : jdk/tier1 part 2
405+ suites : test/jdk/:tier1_part2
406+ - test : jdk/tier1 part 3
407+ suites : test/jdk/:tier1_part3
408+
409+ env :
410+ JDK_VERSION : " ${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}.${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_INTERIM }}.${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_UPDATE }}"
411+ BOOT_JDK_VERSION : " ${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
412+ BOOT_JDK_FILENAME : " ${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
413+ BOOT_JDK_URL : " ${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
414+ BOOT_JDK_SHA256 : " ${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
415+
416+ steps :
417+ - name : Checkout the source
418+ uses : actions/checkout@v2
419+
420+ - name : Restore boot JDK from cache
421+ id : bootjdk
422+ uses : actions/cache@v2
423+ with :
424+ path : ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
425+ key : bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
426+
427+ - name : Download boot JDK
428+ run : |
429+ mkdir -p "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
430+ wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
431+ echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | sha256sum -c >/dev/null -
432+ tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
433+ mv "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"*/* "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"
434+ if : steps.bootjdk.outputs.cache-hit != 'true'
435+
436+ - name : Restore jtreg artifact
437+ id : jtreg_restore
438+ uses : actions/download-artifact@v2
439+ with :
440+ name : transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
441+ path : ~/jtreg/
442+ continue-on-error : true
443+
444+ - name : Restore jtreg artifact (retry)
445+ uses : actions/download-artifact@v2
446+ with :
447+ name : transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
448+ path : ~/jtreg/
449+ if : steps.jtreg_restore.outcome == 'failure'
450+
451+ - name : Restore build artifacts
452+ id : build_restore
453+ uses : actions/download-artifact@v2
454+ with :
455+ name : transient_jdk-linux-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
456+ path : ~/jdk-linux-x64${{ matrix.artifact }}
457+ continue-on-error : true
458+
459+ - name : Restore build artifacts (retry)
460+ uses : actions/download-artifact@v2
461+ with :
462+ name : transient_jdk-linux-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
463+ path : ~/jdk-linux-x64${{ matrix.artifact }}
464+ if : steps.build_restore.outcome == 'failure'
465+
466+ - name : Unpack jdk
467+ run : |
468+ mkdir -p "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}"
469+ tar -xf "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}"
470+
471+ - name : Unpack tests
472+ run : |
473+ mkdir -p "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}"
474+ tar -xf "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}"
475+
476+ - name : Find root of jdk image dir
477+ run : |
478+ imageroot=`find ${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }} -name release -type f`
479+ echo "imageroot=`dirname ${imageroot}`" >> $GITHUB_ENV
480+
481+ - name : Turn on system security properties and FIPS mode support
482+ run : |
483+ sed -i -e "s:^security.useSystemPropertiesFile=.*:security.useSystemPropertiesFile=true:" ${{ env.imageroot }}/conf/security/java.security
484+
485+ - name : Run tests
486+ run : >
487+ JDK_IMAGE_DIR=${{ env.imageroot }}
488+ TEST_IMAGE_DIR=${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}
489+ BOOT_JDK=${HOME}/bootjdk/${BOOT_JDK_VERSION}
490+ JT_HOME=${HOME}/jtreg
491+ make test-prebuilt
492+ CONF_NAME=run-test-prebuilt
493+ LOG_CMDLINES=true
494+ JTREG_VERBOSE=fail,error,time
495+ TEST="${{ matrix.suites }}"
496+ TEST_OPTS_JAVA_OPTIONS=
497+ JTREG_KEYWORDS="!headful"
498+ JTREG="JAVA_OPTIONS='-Djava.security.debug=properties -XX:-CreateCoredumpOnCrash'"
499+
500+ - name : Check that all tests executed successfully
501+ if : always()
502+ run : >
503+ if ! grep --include=test-summary.txt -lqr build/*/test-results -e "TEST SUCCESS" ; then
504+ cat build/*/test-results/*/text/newfailures.txt ;
505+ cat build/*/test-results/*/text/other_errors.txt ;
506+ exit 1 ;
507+ fi
508+
509+ - name : Create suitable test log artifact name
510+ if : always()
511+ run : echo "logsuffix=`echo ${{ matrix.test }} | sed -e 's!/!_!'g -e 's! !_!'g`" >> $GITHUB_ENV
512+
513+ - name : Package test results
514+ if : always()
515+ working-directory : build/run-test-prebuilt/test-results/
516+ run : >
517+ zip -r9
518+ "$HOME/linux-x64${{ matrix.artifact }}-fips_testresults_${{ env.logsuffix }}.zip"
519+ .
520+ continue-on-error : true
521+
522+ - name : Package test support
523+ if : always()
524+ working-directory : build/run-test-prebuilt/test-support/
525+ run : >
526+ zip -r9
527+ "$HOME/linux-x64${{ matrix.artifact }}-fips_testsupport_${{ env.logsuffix }}.zip"
528+ .
529+ -i *.jtr
530+ -i */hs_err*.log
531+ -i */replay*.log
532+ continue-on-error : true
533+
534+ - name : Persist test results
535+ if : always()
536+ uses : actions/upload-artifact@v2
537+ with :
538+ path : ~/linux-x64${{ matrix.artifact }}-fips_testresults_${{ env.logsuffix }}.zip
539+ continue-on-error : true
540+
541+ - name : Persist test outputs
542+ if : always()
543+ uses : actions/upload-artifact@v2
544+ with :
545+ path : ~/linux-x64${{ matrix.artifact }}-fips_testsupport_${{ env.logsuffix }}.zip
546+ continue-on-error : true
547+
387548 linux_additional_build :
388549 name : Linux additional
389550 runs-on : " ubuntu-20.04"
@@ -1667,6 +1828,7 @@ jobs:
16671828 - linux_additional_build
16681829 - windows_aarch64_build
16691830 - linux_x64_test
1831+ - linux_x64_test_fips
16701832 - linux_x86_test
16711833 - windows_x64_test
16721834 - macos_x64_test
0 commit comments