Add standalone cases (#3536)
This commit is contained in:
BIN
tests/standalone/c-ray/c_ray.wasm
Normal file
BIN
tests/standalone/c-ray/c_ray.wasm
Normal file
Binary file not shown.
23
tests/standalone/c-ray/run.sh
Executable file
23
tests/standalone/c-ray/run.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
#
|
||||
|
||||
if [[ $2 == "--sgx" ]];then
|
||||
readonly IWASM_CMD="../../../product-mini/platforms/linux-sgx/enclave-sample/iwasm"
|
||||
else
|
||||
readonly IWASM_CMD="../../../product-mini/platforms/linux/build/iwasm"
|
||||
fi
|
||||
readonly WAMRC_CMD="../../../wamr-compiler/build/wamrc"
|
||||
|
||||
if [[ $1 != "--aot" ]]; then
|
||||
echo "============> run c_ray.wasm"
|
||||
cat scene | ${IWASM_CMD} c_ray.wasm -s 1024x768 > foo.ppm
|
||||
else
|
||||
echo "============> compile c_ray.wasm to aot"
|
||||
[[ $2 == "--sgx" ]] && ${WAMRC_CMD} -sgx -o c_ray.aot c_ray.wasm \
|
||||
|| ${WAMRC_CMD} -o c_ray.aot c_ray.wasm
|
||||
echo "============> run c_ray.aot"
|
||||
cat scene | ${IWASM_CMD} c_ray.aot -s 1024x768 > foo.ppm
|
||||
fi
|
||||
18
tests/standalone/c-ray/scene
Normal file
18
tests/standalone/c-ray/scene
Normal file
@ -0,0 +1,18 @@
|
||||
# spheres
|
||||
# position radius color shininess reflectivity
|
||||
s -1.5 -0.3 -1 0.7 1.0 0.2 0.05 50.0 0.3
|
||||
s 1.5 -0.4 0 0.6 0.1 0.85 1.0 50.0 0.4
|
||||
|
||||
# walls
|
||||
s 0 -1000 2 999 0.1 0.2 0.6 80.0 0.8
|
||||
|
||||
# bouncing ball
|
||||
s 0 0 2 1 1.0 0.5 0.1 60.0 0.7
|
||||
|
||||
# lights...
|
||||
l -50 100 -50
|
||||
l 40 40 150
|
||||
|
||||
# camera (there can be only one!)
|
||||
# position FOV target
|
||||
c 0 6 -17 45 0 -1 0
|
||||
Reference in New Issue
Block a user