You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a very incomplete version, of the tester, still WIP. This is a collab with @et92
`#!/bin/bash
Set the path to the Unikraft build directory
export UNIKRAFT_BUILD_DIR=../../unikraft
Set the path to the app-elfloader
export APP_LOADER_PATH=../run-app-elfloader/
Define function to run and test an application
run_app() {
app_path=$1
app_name=$2
test_arg=$3
# Run the app-elfloader with the application and test argument
$APP_LOADER_PATH $app_path $test_arg
sleep 1
# Check the exit code of the app-elfloader
if [ $? -eq 0 ]; then
echo "$app_name ($test_arg): SUCCESS"
else
echo "$app_name ($test_arg): FAILED"
fi
}
echo "Testing applications in static-pie-apps repository..."
for app in $(ls ../static-pie-apps); do
app_path=../static-pie-apps/$app/$app
app_name=$(basename $app_path)
echo "$app_name"
# Run the application with a unique test argument
if [ "$app_name" = "bc" ]; then
run_app $app_path $app_name "5+1"
elif [ "$app_name" = "anotherapp" ]; then
run_app $app_path $app_name "--test-2"
else
run_app $app_path $app_name "--default-test"
fi
done
echo "Testing applications in dynamic-apps repository..."
for app in $(ls ../dynamic-apps); do
app_path=../dynamic-apps/$app
app_name=$(basename $app_path)
echo "$app_name"
# Run the application with a unique test argument
if [ "$app_name" = "myapp" ]; then
run_app $app_path $app_name "--test-1"
elif [ "$app_name" = "anotherapp" ]; then
run_app $app_path $app_name "--test-2"
else
run_app $app_path $app_name "--default-test"
fi
Create a script that walks through all applications in the
static-pie-apps
repository and thedynamic-apps
repository and uses them as tests for Unikraft using theapp-elfloader
. It summarizes which applications work, which applications don't work, and their issues.Hackathon points: 100
The text was updated successfully, but these errors were encountered: