From 379e9de0e86e1e1d720c00bb821dcd437fbcc2b6 Mon Sep 17 00:00:00 2001 From: Rintaro Kuroiwa Date: Thu, 13 Apr 2017 14:56:59 -0700 Subject: [PATCH] Add presubmit config and script - Changed continuous.bat to build.bat to share with presubmit task. - Modified the build script to figure out the directory structure in the builder. Change-Id: Id559f81e2206757f31e925cef7e3560a26d0a3ab --- kokoro/windows/x64/build.bat | 32 +++++++++++++++++++++++++++++++ kokoro/windows/x64/continuous.bat | 17 ---------------- kokoro/windows/x64/continuous.cfg | 2 +- kokoro/windows/x64/presubmit.cfg | 1 + 4 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 kokoro/windows/x64/build.bat delete mode 100644 kokoro/windows/x64/continuous.bat create mode 100644 kokoro/windows/x64/presubmit.cfg diff --git a/kokoro/windows/x64/build.bat b/kokoro/windows/x64/build.bat new file mode 100644 index 0000000000..2bed6a1ad7 --- /dev/null +++ b/kokoro/windows/x64/build.bat @@ -0,0 +1,32 @@ +:: Copyright 2017 Google Inc. All Rights Reserved. +set OUTPUT_DIRECTORY=Release_x64 +set GYP_DEFINES=target_arch=x64 + +set ROOTDIR=%cd% +set PACKAGERDIR=%ROOTDIR%\git\packager + +:: TODO(rkuroiwa): There are several `dir`s in this script to figure out the +:: directory structure created by the builder. Remove them. +dir + +dir .. + +:: TODO(rkuroiwa): Put this in a batch script and source it, so that this +:: doesn't need to be copied for all configurations. +git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ..\depot_tools\ +set DEPOTTOOLSDIR=%ROOTDIR%\..\depot_tools + +python %PACKAGERDIR%\kokoro\deps_replacer.py "github.com" "github.googlesource.com" + +cd %PACKAGERDIR%\.. +dir +move packager src + +%DEPOTTOOLSDIR%\gclient config https://github.com/google/shaka-packager.git --name=src --unmanaged +%DEPOTTOOLSDIR%\gclient sync +cd src +%DEPOTTOOLSDIR%\ninja -C "out\%OUTPUT_DIRECTORY%" -k 100 + +copy "out\%OUTPUT_DIRECTORY%\packager.exe" packager-win.exe +for %%f in ("out\%OUTPUT_DIRECTORY%\*_*test.exe") do (%%f || exit /b 666) +python "out\%OUTPUT_DIRECTORY%\packager_test.py" -v diff --git a/kokoro/windows/x64/continuous.bat b/kokoro/windows/x64/continuous.bat deleted file mode 100644 index 5cbb22cc9d..0000000000 --- a/kokoro/windows/x64/continuous.bat +++ /dev/null @@ -1,17 +0,0 @@ -:: Copyright 2017 Google Inc. All Rights Reserved. -set OUTPUT_DIRECTORY=Release_x64 -set GYP_DEFINES=target_arch=x64 - -:: TODO(rkuroiwa): Put this in a batch script and source it, so that this -:: doesn't need to be copied for all configurations. -git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ..\depot_tools\ -cd .. -python src\kokoro\deps_replacer.py "github.com" "github.googlesource.com" -depot_tools\gclient config https://github.com/google/shaka-packager.git --name=src --unmanaged -depot_tools\gclient sync -cd src -..\depot_tools\ninja -C "out\%OUTPUT_DIRECTORY%" -k 100 - -copy "out\%OUTPUT_DIRECTORY%\packager.exe" packager-win.exe -for %%f in ("out\%OUTPUT_DIRECTORY%\*_*test.exe") do (%%f || exit /b 666) -python "out\%OUTPUT_DIRECTORY%\packager_test.py" -v diff --git a/kokoro/windows/x64/continuous.cfg b/kokoro/windows/x64/continuous.cfg index 738f3a369d..4ac46a645d 100644 --- a/kokoro/windows/x64/continuous.cfg +++ b/kokoro/windows/x64/continuous.cfg @@ -1 +1 @@ -build_file: "packager/kokoro/windows/x64/continuous.bat" +build_file: "packager/kokoro/windows/x64/build.bat" diff --git a/kokoro/windows/x64/presubmit.cfg b/kokoro/windows/x64/presubmit.cfg new file mode 100644 index 0000000000..4ac46a645d --- /dev/null +++ b/kokoro/windows/x64/presubmit.cfg @@ -0,0 +1 @@ +build_file: "packager/kokoro/windows/x64/build.bat"