mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-19 20:34:30 +00:00
51f07c4473
Added tagName to give unique logger name for multiple share attempts. Turn off markers_enabled for subclasses Renamed multiapp to appshare. Description is now more accurate Changed appshare to use class instances for each sub workload. This allows APKs to be setup correctly on the device Photos changed function name
50 lines
1.5 KiB
Bash
Executable File
50 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# CD into build dir if possible - allows building from any directory
|
|
script_path='.'
|
|
if `readlink -f $0 &>/dev/null`; then
|
|
script_path=`readlink -f $0 2>/dev/null`
|
|
fi
|
|
script_dir=`dirname $script_path`
|
|
cd $script_dir
|
|
|
|
# Ensure build.xml exists before starting
|
|
if [[ ! -f build.xml ]]; then
|
|
echo 'Ant build.xml file not found! Check that you are in the right directory.'
|
|
exit 9
|
|
fi
|
|
|
|
# Copy base classes from wlauto dist
|
|
class_dir=bin/classes/com/arm/wlauto/uiauto
|
|
base_classes=`python -c "import os, wlauto; print os.path.join(os.path.dirname(wlauto.__file__), 'common', 'android', '*.class')"`
|
|
mkdir -p $class_dir
|
|
cp $base_classes $class_dir
|
|
|
|
# Add appshare workload dependencies
|
|
apps=("googlephotos" "gmail" "skype")
|
|
|
|
for app in "${apps[@]}"; do
|
|
module_path="wlauto.workloads.${app}"
|
|
app_path="'uiauto/bin/classes/com/arm/wlauto/uiauto/${app}'"
|
|
app_class_dir=`python -c "import os, ${module_path}; print os.path.join(os.path.dirname(${module_path}.__file__), ${app_path})"`
|
|
cp -r $app_class_dir $class_dir
|
|
done
|
|
|
|
# Build and return appropriate exit code if failed
|
|
ant build
|
|
exit_code=$?
|
|
if [[ $exit_code -ne 0 ]]; then
|
|
echo "ERROR: 'ant build' exited with code $exit_code"
|
|
exit $exit_code
|
|
fi
|
|
|
|
# If successful move JAR file to workload folder (overwrite previous)
|
|
package=com.arm.wlauto.uiauto.appshare.jar
|
|
rm -f ../$package
|
|
if [[ -f bin/$package ]]; then
|
|
cp bin/$package ..
|
|
else
|
|
echo 'ERROR: UiAutomator JAR could not be found!'
|
|
exit 9
|
|
fi
|