Commit 1be28e18 authored by Mike JS. Choi's avatar Mike JS. Choi Committed by Carola Nitz

Tests: Add script to download assets

parent 458b3556
......@@ -975,6 +975,7 @@
isa = PBXNativeTarget;
buildConfigurationList = CA0301D520ADFD2500452BB8 /* Build configuration list for PBXNativeTarget "MobileVLCKitTests" */;
buildPhases = (
CA738BF020F3487500901B26 /* ShellScript */,
CA0301C720ADFD2500452BB8 /* Sources */,
CA0301C820ADFD2500452BB8 /* Frameworks */,
CA0301C920ADFD2500452BB8 /* Resources */,
......@@ -993,6 +994,7 @@
isa = PBXNativeTarget;
buildConfigurationList = CAA03D1120C8DCDB001764DA /* Build configuration list for PBXNativeTarget "TVVLCKitTests" */;
buildPhases = (
CA738BF520F34D3400901B26 /* ShellScript */,
CAA03D0320C8DCDA001764DA /* Sources */,
CAA03D0420C8DCDA001764DA /* Frameworks */,
CAA03D0520C8DCDA001764DA /* Resources */,
......@@ -1101,6 +1103,35 @@
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
CA738BF020F3487500901B26 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "sh Tests/downloadTestAssets.sh\n";
};
CA738BF520F34D3400901B26 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "sh Tests/downloadTestAssets.sh\n";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7D1329551BA304D900BE647E /* Sources */ = {
isa = PBXSourcesBuildPhase;
......
#!/bin/sh
# Copyright (C) Mike JS. Choi, 2018
# Copyright (C) 2018 VLC authors and VideoLAN
set -e
error()
{
local red="\033[31m"
local normal="\033[0m"
echo "${red}error:${normal} $1"
}
ASSET_DIR="Assets"
PWD=$(pwd | xargs basename);
if [ ${PWD} = "vlckit" ] || [ ${PWD} = "project" ] ; then
cd Tests
elif [ ${PWD} != "Tests" ]; then
error "Running program from unknown directory. Please move to project's root directory; vlckit"
exit 1
fi
if [ -d ${ASSET_DIR}/.git ]; then
cd ${ASSET_DIR}
git reset --hard
git pull origin master
else
git clone https://code.videolan.org/videolan/TestAssets.git ${ASSET_DIR}
if [ $? -ne 0 ]; then
error "Please remove all files in vlckit/Tests/${ASSET_DIR} and try again"
exit 1
fi
fi
......@@ -621,6 +621,7 @@
isa = PBXNativeTarget;
buildConfigurationList = CA23EBC420BDF02700C0D635 /* Build configuration list for PBXNativeTarget "VLCKitTests" */;
buildPhases = (
CA738BF820F3500A00901B26 /* Run Script */,
CA23EBB820BDF02700C0D635 /* Sources */,
CA23EBB920BDF02700C0D635 /* Frameworks */,
CA23EBBA20BDF02700C0D635 /* Resources */,
......@@ -688,6 +689,23 @@
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
CA738BF820F3500A00901B26 /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "sh Tests/downloadTestAssets.sh\n";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7DC28D3D20194043002D05C4 /* Sources */ = {
isa = PBXSourcesBuildPhase;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment