Change netty ut java version to jdk8
This commit is contained in:
		
							parent
							
								
									37c56c8b81
								
							
						
					
					
						commit
						5043797bc8
					
				
							
								
								
									
										2
									
								
								.github/workflows/demo_test.yml
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										2
									
								
								.github/workflows/demo_test.yml
									
									
									
									
										vendored
									
									
								
							| @ -940,7 +940,7 @@ jobs: | ||||
|       run: docker exec ${{ github.job }} bash -c "cd /root/occlum/demos/netty_ut && ./build.sh" | ||||
| 
 | ||||
|     - name: Run netty unit test demo | ||||
|       run: docker exec ${{ github.job }} bash -c "cd /root/occlum/demos/netty_ut && SGX_MODE=SIM ./run_netty_ut_jdk11.sh" | ||||
|       run: docker exec ${{ github.job }} bash -c "cd /root/occlum/demos/netty_ut && SGX_MODE=SIM ./run_netty_ut_jdk8.sh" | ||||
|      | ||||
|     - name: Clean Netty test | ||||
|       run: docker exec ${{ github.job }} bash -c "cd /root/occlum/demos && rm -rf ./netty_ut" | ||||
|  | ||||
							
								
								
									
										2
									
								
								.github/workflows/hw_mode_test.yml
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										2
									
								
								.github/workflows/hw_mode_test.yml
									
									
									
									
										vendored
									
									
								
							| @ -1128,7 +1128,7 @@ jobs: | ||||
|       run: docker exec ${{ env.CONTAINER_NAME }} bash -c "cd /root/occlum/demos/netty_ut && ./build.sh" | ||||
| 
 | ||||
|     - name: Run netty unit test demo | ||||
|       run: docker exec ${{ env.CONTAINER_NAME }} bash -c "cd /root/occlum/demos/netty_ut && ./run_netty_ut_jdk11.sh" | ||||
|       run: docker exec ${{ env.CONTAINER_NAME }} bash -c "cd /root/occlum/demos/netty_ut && ./run_netty_ut_jdk8.sh" | ||||
| 
 | ||||
|     - name: Clean the environment | ||||
|       if: ${{ always() }} | ||||
|  | ||||
| @ -3,7 +3,7 @@ | ||||
| This demo demonstrates how to verify the completeness of Netty on Occlum. | ||||
| 
 | ||||
| ### 1. Preinstall dependencies | ||||
| Related dependencies: OpenJDK 11 (Glibc) | ||||
| Related dependencies: OpenJDK 8 (Glibc) | ||||
| ``` | ||||
| ./preinstall_deps.sh | ||||
| ``` | ||||
| @ -15,5 +15,5 @@ Related dependencies: OpenJDK 11 (Glibc) | ||||
| 
 | ||||
| ### 3. Run `netty unit test ` on Occlum | ||||
| ``` | ||||
| ./run_netty_ut_jdk11.sh | ||||
| ./run_netty_ut_jdk8.sh | ||||
| ``` | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| includes:  | ||||
|   - base.yaml | ||||
|   - java-11-openjdk-amd64.yaml | ||||
|   - java-8-openjdk-amd64.yaml | ||||
| targets:  | ||||
|   # copy sofaboot jar | ||||
|   - target: /usr/lib | ||||
| @ -3,8 +3,7 @@ set -e | ||||
| 
 | ||||
| OS=`awk -F= '/^NAME/{print $2}' /etc/os-release` | ||||
| if [ "$OS" == "\"Ubuntu\"" ]; then | ||||
|   apt-get update -y && apt-get install -y openjdk-11-jdk | ||||
|   rm -rf /usr/lib/jvm/java-11-openjdk-amd64/lib/security/blacklisted.certs | ||||
|   apt-get update -y && apt-get install -y openjdk-8-jdk | ||||
| else | ||||
|   echo "Unsupported OS: $OS" | ||||
|   exit 1 | ||||
|  | ||||
| @ -23,15 +23,15 @@ init_instance() { | ||||
|                 .resource_limits.kernel_space_heap_max_size="64MB" | | ||||
|                 .resource_limits.max_num_of_threads = 128 | | ||||
|                 .process.default_heap_size = "512MB" | | ||||
|                 .entry_points = [ "/usr/lib/jvm/java-11-openjdk-amd64/bin" ] | | ||||
|                 .env.default = [ "LD_LIBRARY_PATH=/usr/lib/jvm/java-11-openjdk-amd64/lib/server:/usr/lib/jvm/java-11-openjdk-amd64/lib:/usr/lib/jvm/java-11-openjdk-amd64/../lib:/lib" ]' Occlum.json)" && \ | ||||
|                 .entry_points = [ "/usr/lib/jvm/java-8-openjdk-amd64/bin" ] | | ||||
|                 .env.default = [ "LD_LIBRARY_PATH=/usr/lib/jvm/java-8-openjdk-amd64/lib/server:/usr/lib/jvm/java-8-openjdk-amd64/lib:/usr/lib/jvm/java-8-openjdk-amd64/../lib:/lib" ]' Occlum.json)" && \ | ||||
|     echo "${new_json}" > Occlum.json | ||||
| } | ||||
| 
 | ||||
| build_netty_ut() { | ||||
|     # Copy JVM and JAR file into Occlum instance and build | ||||
|     rm -rf image | ||||
|     copy_bom -f ../netty-ut-jdk11.yaml --root image --include-dir /opt/occlum/etc/template | ||||
|     copy_bom -f ../netty-ut-jdk8.yaml --root image --include-dir /opt/occlum/etc/template | ||||
|     occlum build | ||||
| } | ||||
| 
 | ||||
| @ -42,7 +42,7 @@ run_netty_ut() { | ||||
|     init_instance | ||||
|     build_netty_ut | ||||
|     echo -e "${BLUE}occlum run netty ut${NC}" | ||||
|     occlum run /usr/lib/jvm/java-11-openjdk-amd64/bin/java \ | ||||
|     occlum run /usr/lib/jvm/java-8-openjdk-amd64/bin/java \ | ||||
|         -Xmx1048m -XX:-UseCompressedOops -XX:MaxMetaspaceSize=128m \ | ||||
|         -XX:ActiveProcessorCount=2 \ | ||||
|         -Dos.name=Linux \ | ||||
| @ -50,7 +50,7 @@ run_netty_ut() { | ||||
|         -cp /usr/lib/netty/netty-testsuite-4.1.51.Final.jar:/usr/lib/netty/netty-all-4.1.51.Final.jar:/usr/lib/netty/xz-1.5.jar:/usr/lib/netty/hamcrest-library-1.3.jar:/usr/lib/netty/logback-classic-1.1.7.jar \ | ||||
|         --scan-class-path > netty-test-heap512m.log || true | ||||
|     cat netty-test-heap512m.log | ||||
|     cat netty-test-heap512m.log | grep "141 containers successful" | ||||
|     cat netty-test-heap512m.log | grep "190 tests successful" | ||||
| }        | ||||
| 
 | ||||
| run_netty_ut | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user