From a2bcc9e899118fe47c0260e66f26539b3f5e4740 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Tue, 20 Nov 2018 15:19:54 -0800 Subject: [PATCH 01/23] teeny weeny typo... --- tools/nitpick/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/nitpick/README.md b/tools/nitpick/README.md index 3bbc4fbac1..dce3880123 100644 --- a/tools/nitpick/README.md +++ b/tools/nitpick/README.md @@ -55,7 +55,7 @@ These steps assume the hifi repository has been cloned to `~/hifi`. 1. __To run nitpick, double click **nitpick.exe**__ #### Mac -1. (Firat time) install Python from https://www.python.org/downloads/release/python-370/ (**macOS 64-bit installer** or **macOS 64-bit/32-bit installer**) +1. (First time) install Python from https://www.python.org/downloads/release/python-370/ (**macOS 64-bit installer** or **macOS 64-bit/32-bit installer**) 1. After installation - run `open "/Applications/Python 3.6/Install Certificates.command"`. This is needed because the Mac Python supplied no longer links with the deprecated Apple-supplied system OpenSSL libraries but rather supplies a private copy of OpenSSL 1.0.2 which does not automatically access the system default root certificates. 1. Verify that `/usr/local/bin/python3` exists. 1. (First time - AWS interface) Install pip with the script provided by the Python Packaging Authority: From f6ffb16103b3788078ca2cd90cf65c7562c263d4 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Tue, 20 Nov 2018 15:21:39 -0800 Subject: [PATCH 02/23] Version 1.1 --- tools/nitpick/src/ui/Nitpick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/nitpick/src/ui/Nitpick.cpp b/tools/nitpick/src/ui/Nitpick.cpp index a4aef8fad5..201d6e562d 100644 --- a/tools/nitpick/src/ui/Nitpick.cpp +++ b/tools/nitpick/src/ui/Nitpick.cpp @@ -36,7 +36,7 @@ Nitpick::Nitpick(QWidget* parent) : QMainWindow(parent) { _ui.statusLabel->setText(""); _ui.plainTextEdit->setReadOnly(true); - setWindowTitle("Nitpick - v1.0"); + setWindowTitle("Nitpick - v1.1"); // Coming soon to a nitpick near you... //// _helpWindow.textBrowser->setText() From c3c41700f6a9ea8fd00782e631a9ce38c4fdbd57 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Tue, 20 Nov 2018 17:01:58 -0800 Subject: [PATCH 03/23] Can delete temporarY AppData folder and rename High Fidelity folder as a temporary folder --- tools/nitpick/src/TestRunner.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/nitpick/src/TestRunner.cpp b/tools/nitpick/src/TestRunner.cpp index c7823ba751..30aad70f5f 100644 --- a/tools/nitpick/src/TestRunner.cpp +++ b/tools/nitpick/src/TestRunner.cpp @@ -336,16 +336,18 @@ void TestRunner::saveExistingHighFidelityAppDataFolder() { QString dataDirectory{ "NOT FOUND" }; dataDirectory = qgetenv("USERPROFILE") + "\\AppData\\Roaming"; - +#elif defined Q_OS_MAC + QString dataDirectory{ QDir::homePath() + "/Library/Application Support" }; +#endif if (_runLatest->isChecked()) { - _appDataFolder = dataDirectory + "\\High Fidelity"; + _appDataFolder = dataDirectory + "/High Fidelity"; } else { // We are running a PR build - _appDataFolder = dataDirectory + "\\High Fidelity - " + getPRNumberFromURL(_url->text()); + _appDataFolder = dataDirectory + "/High Fidelity - " + getPRNumberFromURL(_url->text()); } _savedAppDataFolder = dataDirectory + "/" + UNIQUE_FOLDER_NAME; - if (_savedAppDataFolder.exists()) { + if (QDir(_savedAppDataFolder).exists()) { _savedAppDataFolder.removeRecursively(); } @@ -356,9 +358,6 @@ void TestRunner::saveExistingHighFidelityAppDataFolder() { // Copy an "empty" AppData folder (i.e. no entities) copyFolder(QDir::currentPath() + "/AppDataHighFidelity", _appDataFolder.path()); -#elif defined Q_OS_MAC - // TODO: find Mac equivalent of AppData -#endif } void TestRunner::createSnapshotFolder() { From 4ef54cd4f277e43bcbc355a87f8019da617266e9 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Tue, 20 Nov 2018 17:45:37 -0800 Subject: [PATCH 04/23] Tests run without Interface crashing. --- tools/nitpick/src/TestRunner.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/nitpick/src/TestRunner.cpp b/tools/nitpick/src/TestRunner.cpp index 30aad70f5f..0a5002d02d 100644 --- a/tools/nitpick/src/TestRunner.cpp +++ b/tools/nitpick/src/TestRunner.cpp @@ -350,7 +350,6 @@ void TestRunner::saveExistingHighFidelityAppDataFolder() { if (QDir(_savedAppDataFolder).exists()) { _savedAppDataFolder.removeRecursively(); } - if (_appDataFolder.exists()) { // The original folder is saved in a unique name _appDataFolder.rename(_appDataFolder.path(), _savedAppDataFolder.path()); From 4c0f8b176b72ba0e66c0f50510d4fba0b4a67388 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Tue, 20 Nov 2018 19:59:43 -0800 Subject: [PATCH 05/23] No need for this after implementation of AppData on Mac. --- tools/nitpick/src/TestRunner.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/nitpick/src/TestRunner.cpp b/tools/nitpick/src/TestRunner.cpp index 0a5002d02d..9549dedb91 100644 --- a/tools/nitpick/src/TestRunner.cpp +++ b/tools/nitpick/src/TestRunner.cpp @@ -467,12 +467,7 @@ void TestRunner::runInterfaceWithTestScript() { // Move to an empty area url = "file:///~serverless/tutorial.json"; } else { -#ifdef Q_OS_WIN url = "hifi://localhost"; -#elif defined Q_OS_MAC - // TODO: Find out Mac equivalent of AppData, then this won't be needed - url = "hifi://localhost/9999,9999,9999"; -#endif } QString testScript = From eb2533d22418f0fc24b3f37f685d7235b2ae26fc Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Tue, 20 Nov 2018 20:51:20 -0800 Subject: [PATCH 06/23] Updated CMake file to include the AppData folder --- tools/nitpick/CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/nitpick/CMakeLists.txt b/tools/nitpick/CMakeLists.txt index 543b9c9b47..efb5125f69 100644 --- a/tools/nitpick/CMakeLists.txt +++ b/tools/nitpick/CMakeLists.txt @@ -50,10 +50,12 @@ if (WIN32) ) # add a custom command to copy the empty Apps/Data High Fidelity folder (i.e. - a valid folder with no entities) + # this also copied to the containing folder, to facilitate running from Visual Studio add_custom_command( TARGET ${TARGET_NAME} POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/AppDataHighFidelity" "$/AppDataHighFidelity" + COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/AppDataHighFidelity" "AppDataHighFidelity" ) # add a custom command to copy the SSL DLLs @@ -62,5 +64,12 @@ if (WIN32) POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory "$ENV{VCPKG_ROOT}/installed/x64-windows/bin" "$" ) +elseif (APPLE) + # add a custom command to copy the empty Apps/Data High Fidelity folder (i.e. - a valid folder with no entities) + add_custom_command( + TARGET ${TARGET_NAME} + POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/AppDataHighFidelity" "$/AppDataHighFidelity" + ) +endif () -endif () \ No newline at end of file From 2b71a82e4e59b853800a705f623744372d275d2a Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Tue, 20 Nov 2018 20:52:13 -0800 Subject: [PATCH 07/23] Updated to v1.1 --- tools/nitpick/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/nitpick/README.md b/tools/nitpick/README.md index dce3880123..e325be1f40 100644 --- a/tools/nitpick/README.md +++ b/tools/nitpick/README.md @@ -35,8 +35,8 @@ These steps assume the hifi repository has been cloned to `~/hifi`. 1. Change the loader instruction to find the dynamic library locally `install_name_tool -change ~/hifi/build/ext/Xcode/quazip/project/lib/libquazip5.1.dylib libquazip5.1.dylib nitpick` 1. Delete any existing installer: `rm nitpick.dmg` -1. Create installer (note final period): `create-dmg --volname nitpick-installer-v1.0 nitpick-installer-v1.0.dmg .` -1. Copy created installer to AWS: `~/Library/Python/3.7/bin/aws s3 cp nitpick-installer-v1.0.dmg s3://hifi-qa/nitpick/Mac/nitpick-installer-v1.0.dmg` +1. Create installer (note final period): `create-dmg --volname nitpick-installer-v1.1 nitpick-installer-v1.1.dmg .` +1. Copy created installer to AWS: `~/Library/Python/3.7/bin/aws s3 cp nitpick-installer-v1.1.dmg s3://hifi-qa/nitpick/Mac/nitpick-installer-v1.1.dmg` ### Installation #### Windows 1. (First time) download and install vc_redist.x64.exe (available at https://hifi-qa.s3.amazonaws.com/nitpick/Windows/nitpick-installer-v1.0.exe) From b3f646e9dc1fe3833e99325545ad1cb710498b80 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Sat, 24 Nov 2018 09:44:46 -0800 Subject: [PATCH 08/23] Updated to v1.1 --- tools/nitpick/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/nitpick/README.md b/tools/nitpick/README.md index e325be1f40..ce65fec64f 100644 --- a/tools/nitpick/README.md +++ b/tools/nitpick/README.md @@ -24,7 +24,7 @@ Nitpick is built as part of the High Fidelity build. 1. Check "Create SFX archive 1. Enter installer name (i.e. `nitpick-installer-v1.0.exe`) 1. Click "OK" -1. Copy created installer to https://hifi-qa.s3.amazonaws.com/nitpick/Windows/nitpick-installer-v1.0.exe: aws s3 cp nitpick-installer-v1.0.exe s3://hifi-qa/nitpick/Mac/nitpick-installer-v1.0.exe +1. Copy created installer to https://hifi-qa.s3.amazonaws.com/nitpick/Windows/nitpick-installer-v1.1.exe: aws s3 cp nitpick-installer-v1.0.exe s3://hifi-qa/nitpick/Mac/nitpick-installer-v1.0.exe #### Mac These steps assume the hifi repository has been cloned to `~/hifi`. 1. (First time) install create-dmg: @@ -49,7 +49,7 @@ These steps assume the hifi repository has been cloned to `~/hifi`. 1. Leave region name and ouput format as default [None] 1. Install the latest release of Boto3 via pip: `pip install boto3` -1. Download the installer by browsing to [here]() +1. Download the installer by browsing to [here]() 1. Double click on the installer and install to a convenient location ![](./setup_7z.PNG) @@ -69,7 +69,7 @@ $ python3 get-pip.py --user 1. Enter the secret key 1. Leave region name and ouput format as default [None] 1. Install the latest release of Boto3 via pip: pip3 install boto3 -1. Download the installer by browsing to [here](). +1. Download the installer by browsing to [here](). 1. Double-click on the downloaded image to mount it 1. Create a folder for the nitpick files (e.g. ~/nitpick) 1. Copy the downloaded files to the folder From f62fd97f09a7be1fa52984da8bb01f7865039ee9 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Sat, 24 Nov 2018 09:49:13 -0800 Subject: [PATCH 09/23] Updated to v1.1 --- tools/nitpick/README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/nitpick/README.md b/tools/nitpick/README.md index ce65fec64f..78b4866880 100644 --- a/tools/nitpick/README.md +++ b/tools/nitpick/README.md @@ -22,9 +22,9 @@ Nitpick is built as part of the High Fidelity build. 1. Select all, right-click and select 7-Zip->Add to archive... 1. Set Archive format to 7z 1. Check "Create SFX archive -1. Enter installer name (i.e. `nitpick-installer-v1.0.exe`) +1. Enter installer name (i.e. `nitpick-installer-v1.1.exe`) 1. Click "OK" -1. Copy created installer to https://hifi-qa.s3.amazonaws.com/nitpick/Windows/nitpick-installer-v1.1.exe: aws s3 cp nitpick-installer-v1.0.exe s3://hifi-qa/nitpick/Mac/nitpick-installer-v1.0.exe +1. Copy created installer to https://hifi-qa.s3.amazonaws.com/nitpick/Windows/nitpick-installer-v1.1.exe: aws s3 cp nitpick-installer-v1.1.exe s3://hifi-qa/nitpick/Mac/nitpick-installer-v1.1.exe #### Mac These steps assume the hifi repository has been cloned to `~/hifi`. 1. (First time) install create-dmg: @@ -39,7 +39,7 @@ These steps assume the hifi repository has been cloned to `~/hifi`. 1. Copy created installer to AWS: `~/Library/Python/3.7/bin/aws s3 cp nitpick-installer-v1.1.dmg s3://hifi-qa/nitpick/Mac/nitpick-installer-v1.1.dmg` ### Installation #### Windows -1. (First time) download and install vc_redist.x64.exe (available at https://hifi-qa.s3.amazonaws.com/nitpick/Windows/nitpick-installer-v1.0.exe) +1. (First time) download and install vc_redist.x64.exe (available at https://hifi-qa.s3.amazonaws.com/nitpick/Windows/nitpick-installer-v1.1.exe) 1. (First time) download and install Python 3 from https://hifi-qa.s3.amazonaws.com/nitpick/Windows/python-3.7.0-amd64.exe (also located at https://www.python.org/downloads/) 1. After installation - create an environment variable called PYTHON_PATH and set it to the folder containing the Python executable. 1. (First time) download and install AWS CLI from https://hifi-qa.s3.amazonaws.com/nitpick/Windows/AWSCLI64PY3.msi (also available at https://aws.amazon.com/cli/ @@ -72,8 +72,9 @@ $ python3 get-pip.py --user 1. Download the installer by browsing to [here](). 1. Double-click on the downloaded image to mount it 1. Create a folder for the nitpick files (e.g. ~/nitpick) + If this folder exists then delete all it's contents. 1. Copy the downloaded files to the folder - `cp -r /Volumes/nitpick-installer-v1.0/* .` + `cp -r /Volumes/nitpick-installer-v1.1/* .` 1. __To run nitpick, cd to the folder that you copied to and run `./nitpick`__ #Use From bbbc358ccbfa31668ad2249f299f4e4326a4e850 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Sat, 24 Nov 2018 20:31:19 -0800 Subject: [PATCH 10/23] Restore AppData folder on Mac --- tools/nitpick/src/TestRunner.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/nitpick/src/TestRunner.cpp b/tools/nitpick/src/TestRunner.cpp index 9549dedb91..30740bd28a 100644 --- a/tools/nitpick/src/TestRunner.cpp +++ b/tools/nitpick/src/TestRunner.cpp @@ -582,15 +582,11 @@ void TestRunner::addBuildNumberToResults(QString zippedFolderName) { } void TestRunner::restoreHighFidelityAppDataFolder() { -#ifdef Q_OS_WIN _appDataFolder.removeRecursively(); if (_savedAppDataFolder != QDir()) { _appDataFolder.rename(_savedAppDataFolder.path(), _appDataFolder.path()); } -#elif defined Q_OS_MAC - // TODO: find Mac equivalent of AppData -#endif } // Copies a folder recursively From 26319e6d6fbd04e4e3ec5f3163b574601ded6556 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Sat, 24 Nov 2018 20:37:21 -0800 Subject: [PATCH 11/23] Remove all disk images --- tools/nitpick/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/nitpick/README.md b/tools/nitpick/README.md index 78b4866880..bdea4eb059 100644 --- a/tools/nitpick/README.md +++ b/tools/nitpick/README.md @@ -34,7 +34,7 @@ These steps assume the hifi repository has been cloned to `~/hifi`. `cp ~/hifi/build/ext/Xcode/quazip/project/lib/libquazip5.1.dylib .` 1. Change the loader instruction to find the dynamic library locally `install_name_tool -change ~/hifi/build/ext/Xcode/quazip/project/lib/libquazip5.1.dylib libquazip5.1.dylib nitpick` -1. Delete any existing installer: `rm nitpick.dmg` +1. Delete any existing disk images: `rm *.dmg` 1. Create installer (note final period): `create-dmg --volname nitpick-installer-v1.1 nitpick-installer-v1.1.dmg .` 1. Copy created installer to AWS: `~/Library/Python/3.7/bin/aws s3 cp nitpick-installer-v1.1.dmg s3://hifi-qa/nitpick/Mac/nitpick-installer-v1.1.dmg` ### Installation From e173b2968739e50e5ae7569b2a04ee283d6deebc Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Sat, 24 Nov 2018 20:43:13 -0800 Subject: [PATCH 12/23] Added warning --- tools/nitpick/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/nitpick/README.md b/tools/nitpick/README.md index bdea4eb059..ae8821c6be 100644 --- a/tools/nitpick/README.md +++ b/tools/nitpick/README.md @@ -36,6 +36,7 @@ These steps assume the hifi repository has been cloned to `~/hifi`. `install_name_tool -change ~/hifi/build/ext/Xcode/quazip/project/lib/libquazip5.1.dylib libquazip5.1.dylib nitpick` 1. Delete any existing disk images: `rm *.dmg` 1. Create installer (note final period): `create-dmg --volname nitpick-installer-v1.1 nitpick-installer-v1.1.dmg .` + Make sure to wait for completion. 1. Copy created installer to AWS: `~/Library/Python/3.7/bin/aws s3 cp nitpick-installer-v1.1.dmg s3://hifi-qa/nitpick/Mac/nitpick-installer-v1.1.dmg` ### Installation #### Windows From 6313ab8ed7d610dd269a45cd03589f1eb0d13f19 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Sun, 25 Nov 2018 20:10:01 -0800 Subject: [PATCH 13/23] Working on possible crash on Mac. --- tools/nitpick/src/Downloader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/nitpick/src/Downloader.cpp b/tools/nitpick/src/Downloader.cpp index de768398b0..3256e79601 100644 --- a/tools/nitpick/src/Downloader.cpp +++ b/tools/nitpick/src/Downloader.cpp @@ -12,12 +12,12 @@ #include Downloader::Downloader(QUrl fileURL, QObject *parent) : QObject(parent) { + _networkAccessManager.get(QNetworkRequest(fileURL)); + connect( &_networkAccessManager, SIGNAL (finished(QNetworkReply*)), this, SLOT (fileDownloaded(QNetworkReply*)) ); - - _networkAccessManager.get(QNetworkRequest(fileURL)); } void Downloader::fileDownloaded(QNetworkReply* reply) { From 2913d4f9841fd6ebd5f32767598b41d9b1700952 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Mon, 26 Nov 2018 08:25:07 -0800 Subject: [PATCH 14/23] Removed baaaaaad file. --- .../domain-server/AccountInfo.bin | Bin 1450 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 tools/nitpick/AppDataHighFidelity/domain-server/AccountInfo.bin diff --git a/tools/nitpick/AppDataHighFidelity/domain-server/AccountInfo.bin b/tools/nitpick/AppDataHighFidelity/domain-server/AccountInfo.bin deleted file mode 100644 index 645e34895e5c2ae38571d19a60c21df84c880b12..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1450 zcmaiuX*d)J9EbliWDyXqirx)88es;s{=7|CAKh> zBjk=;YebG7Q;j3-rehG<dt}>pTS1HE7EiYrSuWTvl;>I*HM&!jW zQF^;JC>UK&QL*QLl`~)>=6uz{euwwhQzNZxEK;lngD; zU}IlZ50Qdg_G#^+%-96}TyTChjkG3Sd77^{k@e0kQ(4Vxx>j52LE7599bdxF^k7DC zL5aEuJBJc_m)W{@eN^tj=SuDz_M?2p)e*;LO>w4!y3seywe_dxv279TT=%hO`%1;5 z{QQ#%I0aWS>(pnJ*3z}%xqBAZ`3?8BF4)LzUfSWZr(J$tuRjrbnu*w0=UIH%uL%u8 zTJ24?;^qZs|KOw=lD|QUx^(Nu{G?E%1OgDq1O$*eFUT-cx9jFeelbfGK9Q;n+!Q=1 zyksC@q2k6^sd9bIQJz);%J95I*2a;-KKXRp)YhJIGT%UBQQ?v73k+sD(dFr<+YJ@Z z&X)hCsJeToSbv17bEHO*+b`&D>^0#vN69K{$S^HZTcC%xXyLLJD_qe%QMX8>S#Qp@FLf+ z$qKKOuD6C(v}Rq&Rm@Sn!?W#d@h}#UksJ=pkd9>2H6{`|JOjp1VFxw23<)Qv80!#H zT$J0or(#;Cv?!D>lvA(kyVx@Mruf$Eg+ZJpt+<7UkaYKOU#9BuN_Q!9G3Ub5K6E51 zi;hcwDzrX!;MeCSEstp$sWH}SdYO%&{m!qp61Q6a@E-F?-n#0rp1_BnuOjUkXRG?H zVaRw(ToHHKP~`iFnm8+U$bl_TX)M)$sK(Oic=w@YHtc>V-$HVdOl%jOAOv=MemJ~_ z=>3~m7c6#ey&p#ky^*0^_2Mep!pfJYULMd?LW@nD&CpK#g3eDS$YX~@<3DCxdY?pP z2k$-^cLa5?GpQ8fpx%qFpMh~w+*RRSqWwZc3)4Ri4vk#5HwOsYT!ua+Uk<=oRf zEt__XDpen1TCzwTnbhn}QWBU!IY~P)v9tu|wbgL*(zdz`rnV<)KIack!@U0#8OdQI z343_VBs0Ct9k!8@?=|YZ<>E7v&$s(eZa@W7-WM1pUd6BR2auc!{$8zgVqK7hZ}ZdE zuZx=Fbq@A_!LW%^>de**+TrNI7M$x)$MczObLpX%@9R1n7Rn~8KYDx3`1%FPVWC3u zK@D`WW0gM3-rR1q2-`a3fa{$Yi?2J5&3FNvYH}2YGpJ< z?$-5)<(3e)O-1K7CaKDx5MG}rYGh10w3pSnr*!4hzQ2PzQ20s_DSC}0U@fCoAR00n*mQ!oQ_pa32$ Qfed)SeP24@fdT>l0D=~Uga7~l From 48fabf51f2847359320b4e9d2ba4ac6f58ccd4ac Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Mon, 26 Nov 2018 08:54:09 -0800 Subject: [PATCH 15/23] Corrected Linux compilation error. --- tools/nitpick/src/TestRunner.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/nitpick/src/TestRunner.cpp b/tools/nitpick/src/TestRunner.cpp index 30740bd28a..65358a0c3d 100644 --- a/tools/nitpick/src/TestRunner.cpp +++ b/tools/nitpick/src/TestRunner.cpp @@ -332,12 +332,11 @@ void TestRunner::verifyInstallationSucceeded() { } void TestRunner::saveExistingHighFidelityAppDataFolder() { -#ifdef Q_OS_WIN QString dataDirectory{ "NOT FOUND" }; - +#ifdef Q_OS_WIN dataDirectory = qgetenv("USERPROFILE") + "\\AppData\\Roaming"; #elif defined Q_OS_MAC - QString dataDirectory{ QDir::homePath() + "/Library/Application Support" }; + dataDirectory{ QDir::homePath() + "/Library/Application Support" }; #endif if (_runLatest->isChecked()) { _appDataFolder = dataDirectory + "/High Fidelity"; From e943504f608f5cb2d9129d3156be6c8441e65b5d Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Mon, 26 Nov 2018 15:59:08 -0800 Subject: [PATCH 16/23] Updated README.md --- tools/nitpick/README.md | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/tools/nitpick/README.md b/tools/nitpick/README.md index ae8821c6be..fe027be227 100644 --- a/tools/nitpick/README.md +++ b/tools/nitpick/README.md @@ -12,7 +12,7 @@ Nitpick has 5 functions, separated into 4 tabs: 1. Evaluating the results of running tests 1. Web interface -## Build +## Build (for developers) Nitpick is built as part of the High Fidelity build. ### Creating installers #### Windows @@ -27,15 +27,17 @@ Nitpick is built as part of the High Fidelity build. 1. Copy created installer to https://hifi-qa.s3.amazonaws.com/nitpick/Windows/nitpick-installer-v1.1.exe: aws s3 cp nitpick-installer-v1.1.exe s3://hifi-qa/nitpick/Mac/nitpick-installer-v1.1.exe #### Mac These steps assume the hifi repository has been cloned to `~/hifi`. +1. (first time) Install brew + In a terminal: `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)` 1. (First time) install create-dmg: - `brew install create-dmg` -1. cd to the `build/tools/nitpick/Release` folder + In a terminal: `brew install create-dmg` +1. In a terminal: cd to the `build/tools/nitpick/Release` folder 1. Copy the quazip dynamic library (note final period): - `cp ~/hifi/build/ext/Xcode/quazip/project/lib/libquazip5.1.dylib .` + In a terminal: `cp ~/hifi/build/ext/Xcode/quazip/project/lib/libquazip5.1.dylib .` 1. Change the loader instruction to find the dynamic library locally - `install_name_tool -change ~/hifi/build/ext/Xcode/quazip/project/lib/libquazip5.1.dylib libquazip5.1.dylib nitpick` -1. Delete any existing disk images: `rm *.dmg` -1. Create installer (note final period): `create-dmg --volname nitpick-installer-v1.1 nitpick-installer-v1.1.dmg .` + In a terminal: `install_name_tool -change ~/hifi/build/ext/Xcode/quazip/project/lib/libquazip5.1.dylib libquazip5.1.dylib nitpick` +1. Delete any existing disk images. In a terminal: `rm *.dmg` +1. Create installer (note final period).In a terminal: `create-dmg --volname nitpick-installer-v1.1 nitpick-installer-v1.1.dmg .` Make sure to wait for completion. 1. Copy created installer to AWS: `~/Library/Python/3.7/bin/aws s3 cp nitpick-installer-v1.1.dmg s3://hifi-qa/nitpick/Mac/nitpick-installer-v1.1.dmg` ### Installation @@ -56,16 +58,20 @@ These steps assume the hifi repository has been cloned to `~/hifi`. 1. __To run nitpick, double click **nitpick.exe**__ #### Mac +1. (first time) Install brew + In a terminal: `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)` +1. (First time) install Qt: + In a terminal: `brew install qt` 1. (First time) install Python from https://www.python.org/downloads/release/python-370/ (**macOS 64-bit installer** or **macOS 64-bit/32-bit installer**) - 1. After installation - run `open "/Applications/Python 3.6/Install Certificates.command"`. This is needed because the Mac Python supplied no longer links with the deprecated Apple-supplied system OpenSSL libraries but rather supplies a private copy of OpenSSL 1.0.2 which does not automatically access the system default root certificates. + 1. After installation - In a terminal: run `open "/Applications/Python 3.6/Install Certificates.command"`. This is needed because the Mac Python supplied no longer links with the deprecated Apple-supplied system OpenSSL libraries but rather supplies a private copy of OpenSSL 1.0.2 which does not automatically access the system default root certificates. 1. Verify that `/usr/local/bin/python3` exists. 1. (First time - AWS interface) Install pip with the script provided by the Python Packaging Authority: -$ curl -O https://bootstrap.pypa.io/get-pip.py -$ python3 get-pip.py --user +In a terminal: `curl -O https://bootstrap.pypa.io/get-pip.py` +In a terminal: `python3 get-pip.py --user` 1. Use pip to install the AWS CLI. - $ pip3 install awscli --upgrade --user + `pip3 install awscli --upgrade --user` This will install aws in your user. For user XXX, aws will be located in ~/Library/Python/3.7/bin - 1. Open a new command prompt and run `aws configure` + 1. Open a new command prompt and run `~/Library/Python/3.7/bin/aws configure` 1. Enter the AWS account number 1. Enter the secret key 1. Leave region name and ouput format as default [None] @@ -75,9 +81,11 @@ $ python3 get-pip.py --user 1. Create a folder for the nitpick files (e.g. ~/nitpick) If this folder exists then delete all it's contents. 1. Copy the downloaded files to the folder - `cp -r /Volumes/nitpick-installer-v1.1/* .` + In a terminal: + `cd ~/nitpick` + `cp -r /Volumes/nitpick-installer-v1.1/* .` -1. __To run nitpick, cd to the folder that you copied to and run `./nitpick`__ +1. __To run nitpick, cd to the folder that you copied to and run `./nitpick`__ #Use ## Create ![](./Create.PNG) From c211dc363b4d41fbef1d729ff04441fbef295a9b Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Mon, 26 Nov 2018 16:05:49 -0800 Subject: [PATCH 17/23] Updated README.md --- tools/nitpick/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/nitpick/README.md b/tools/nitpick/README.md index fe027be227..319d374a5d 100644 --- a/tools/nitpick/README.md +++ b/tools/nitpick/README.md @@ -86,7 +86,7 @@ In a terminal: `python3 get-pip.py --user` `cp -r /Volumes/nitpick-installer-v1.1/* .` 1. __To run nitpick, cd to the folder that you copied to and run `./nitpick`__ -#Use +# Usage ## Create ![](./Create.PNG) From e7ab7094cd1acf473969e89283c87c567b4683e9 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Mon, 26 Nov 2018 16:42:48 -0800 Subject: [PATCH 18/23] Kill Hifi processes after evaluation. --- tools/nitpick/src/TestRunner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/nitpick/src/TestRunner.cpp b/tools/nitpick/src/TestRunner.cpp index 30740bd28a..e3b8adca28 100644 --- a/tools/nitpick/src/TestRunner.cpp +++ b/tools/nitpick/src/TestRunner.cpp @@ -528,8 +528,6 @@ void TestRunner::runInterfaceWithTestScript() { } void TestRunner::interfaceExecutionComplete() { - killProcesses(); - QFileInfo testCompleted(QDir::toNativeSeparators(_snapshotFolder) +"/tests_completed.txt"); if (!testCompleted.exists()) { QMessageBox::critical(0, "Tests not completed", "Interface seems to have crashed before completion of the test scripts\nExisting images will be evaluated"); @@ -537,6 +535,8 @@ void TestRunner::interfaceExecutionComplete() { evaluateResults(); + killProcesses(); + // The High Fidelity AppData folder will be restored after evaluation has completed } From 5da6ecad121ee1111115e5109b9c3b1db1c199ea Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Mon, 26 Nov 2018 18:10:14 -0800 Subject: [PATCH 19/23] Compilation error. --- tools/nitpick/src/TestRunner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/nitpick/src/TestRunner.cpp b/tools/nitpick/src/TestRunner.cpp index 7c2dfda1cd..12bdf87495 100644 --- a/tools/nitpick/src/TestRunner.cpp +++ b/tools/nitpick/src/TestRunner.cpp @@ -336,7 +336,7 @@ void TestRunner::saveExistingHighFidelityAppDataFolder() { #ifdef Q_OS_WIN dataDirectory = qgetenv("USERPROFILE") + "\\AppData\\Roaming"; #elif defined Q_OS_MAC - dataDirectory{ QDir::homePath() + "/Library/Application Support" }; + dataDirectory = QDir::homePath() + "/Library/Application Support"; #endif if (_runLatest->isChecked()) { _appDataFolder = dataDirectory + "/High Fidelity"; From aed947cb0a65ff3006054485503fe616fc45d4b1 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Mon, 26 Nov 2018 18:10:41 -0800 Subject: [PATCH 20/23] Minor cleanup. --- tools/nitpick/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/nitpick/README.md b/tools/nitpick/README.md index 319d374a5d..a02980ddfe 100644 --- a/tools/nitpick/README.md +++ b/tools/nitpick/README.md @@ -37,7 +37,7 @@ These steps assume the hifi repository has been cloned to `~/hifi`. 1. Change the loader instruction to find the dynamic library locally In a terminal: `install_name_tool -change ~/hifi/build/ext/Xcode/quazip/project/lib/libquazip5.1.dylib libquazip5.1.dylib nitpick` 1. Delete any existing disk images. In a terminal: `rm *.dmg` -1. Create installer (note final period).In a terminal: `create-dmg --volname nitpick-installer-v1.1 nitpick-installer-v1.1.dmg .` +1. Create installer (note final period).In a terminal: `create-dmg --volname nitpick-installer-v1.1 nitpick-installer-v1.1.dmg .` Make sure to wait for completion. 1. Copy created installer to AWS: `~/Library/Python/3.7/bin/aws s3 cp nitpick-installer-v1.1.dmg s3://hifi-qa/nitpick/Mac/nitpick-installer-v1.1.dmg` ### Installation From 4effd365ed096e94d0c71077e4a1289129e1bdf5 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Tue, 27 Nov 2018 17:34:17 -0800 Subject: [PATCH 21/23] Change "Autotester" to "nitpick". --- tools/nitpick/src/Test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/nitpick/src/Test.cpp b/tools/nitpick/src/Test.cpp index 47458d00ee..2b862783a7 100644 --- a/tools/nitpick/src/Test.cpp +++ b/tools/nitpick/src/Test.cpp @@ -677,7 +677,7 @@ bool Test::createTestAutoScript(const QString& directory) { stream << "if (typeof PATH_TO_THE_REPO_PATH_UTILS_FILE === 'undefined') PATH_TO_THE_REPO_PATH_UTILS_FILE = 'https://raw.githubusercontent.com/highfidelity/hifi_tests/master/tests/utils/branchUtils.js';\n"; stream << "Script.include(PATH_TO_THE_REPO_PATH_UTILS_FILE);\n"; - stream << "var nitpick = createAutoTester(Script.resolvePath('.'));\n\n"; + stream << "var nitpick = createNitpick(Script.resolvePath('.'));\n\n"; stream << "nitpick.enableAuto();\n\n"; stream << "Script.include('./test.js?raw=true');\n"; @@ -758,7 +758,7 @@ void Test::createRecursiveScript(const QString& topLevelDirectory, bool interact "/tests/utils/branchUtils.js\";" << endl; textStream << "Script.include(PATH_TO_THE_REPO_PATH_UTILS_FILE);" << endl; - textStream << "var nitpick = createAutoTester(Script.resolvePath(\".\"));" << endl << endl; + textStream << "var nitpick = createNitpick(Script.resolvePath(\".\"));" << endl << endl; textStream << "var testsRootPath = nitpick.getTestsRootPath();" << endl << endl; From 59a030a16f3c2b89d47b1007e959dcf052ad546d Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Tue, 27 Nov 2018 17:41:00 -0800 Subject: [PATCH 22/23] Correct message to user. --- tools/nitpick/src/Test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/nitpick/src/Test.cpp b/tools/nitpick/src/Test.cpp index 2b862783a7..e17978d9d0 100644 --- a/tools/nitpick/src/Test.cpp +++ b/tools/nitpick/src/Test.cpp @@ -620,7 +620,7 @@ void Test::createTestAutoScript() { } if (createTestAutoScript(_testDirectory)) { - QMessageBox::information(0, "Success", "'nitpick.js` script has been created"); + QMessageBox::information(0, "Success", "'testAuto.js` script has been created"); } } @@ -748,9 +748,9 @@ void Test::createRecursiveScript(const QString& topLevelDirectory, bool interact QTextStream textStream(&allTestsFilename); - textStream << "// This is an automatically generated file, created by auto-tester" << endl; + textStream << "// This is an automatically generated file, created by nitpick" << endl; - // Include 'autoTest.js' + // Include 'nitpick.js' QString branch = nitpick->getSelectedBranch(); QString user = nitpick->getSelectedUser(); From 87c863584d4bc04af3a38b7d515ffb1ea5b3df25 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Thu, 29 Nov 2018 17:43:19 -0800 Subject: [PATCH 23/23] Just to remove conflict. --- tools/nitpick/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/nitpick/README.md b/tools/nitpick/README.md index a02980ddfe..7d75d660d7 100644 --- a/tools/nitpick/README.md +++ b/tools/nitpick/README.md @@ -1,6 +1,6 @@ # nitpick -Nitpick is a stand alone application that provides a mechanism for regression testing. The general idea is simple: +Nitpick is a stand alone application that provides a mechanism for regression testing. The general idea is simple: * Each test folder has a script that produces a set of snapshots. * The snapshots are compared to a 'canonical' set of images that have been produced beforehand. * The result, if any test failed, is a zipped folder describing the failure.