Skip to content

Commit

Permalink
spec: add tests for the autoUpdater on macOS that actually test if it…
Browse files Browse the repository at this point in the history
… works (#17442)

* spec: add tests for the autoUpdater on macOS that actually test if it works

* spec: add express as dep

* spec: add logic to auto-trust self-signed certificate and not run autoupdate specs on MAS

* build: fix the step name for importing the codesign cert

* chore: update updater spec PR as per feedback

* fix: s/atomBinding/electronBinding

* build: use spawn instead of exec
  • Loading branch information
MarshallOfSound committed Mar 30, 2019
1 parent 5045b0a commit b8dbe4b
Show file tree
Hide file tree
Showing 21 changed files with 923 additions and 48 deletions.
10 changes: 10 additions & 0 deletions .circleci/config.yml
Expand Up @@ -204,6 +204,15 @@ step-fix-sync-on-mac: &step-fix-sync-on-mac
python src/electron/script/update-external-binaries.py
fi
step-install-signing-cert-on-mac: &step-install-signing-cert-on-mac
run:
name: Import and trust self-signed codesigning cert on MacOS
command: |
if [ "`uname`" == "Darwin" ]; then
cd src/electron
./script/codesign/import-testing-cert-ci.sh
fi
step-install-gnutar-on-mac: &step-install-gnutar-on-mac
run:
name: Install gnu-tar on macos
Expand Down Expand Up @@ -753,6 +762,7 @@ steps-tests: &steps-tests
- *step-setup-linux-for-headless-testing
- *step-restore-brew-cache
- *step-fix-known-hosts-linux
- *step-install-signing-cert-on-mac

- run:
name: Run Electron tests
Expand Down
9 changes: 9 additions & 0 deletions atom/common/api/features.cc
Expand Up @@ -41,6 +41,14 @@ bool IsPrintingEnabled() {
return BUILDFLAG(ENABLE_PRINTING);
}

bool IsComponentBuild() {
#if defined(COMPONENT_BUILD)
return true;
#else
return false;
#endif
}

void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
Expand All @@ -55,6 +63,7 @@ void Initialize(v8::Local<v8::Object> exports,
dict.SetMethod("isViewApiEnabled", &IsViewApiEnabled);
dict.SetMethod("isTtsEnabled", &IsTtsEnabled);
dict.SetMethod("isPrintingEnabled", &IsPrintingEnabled);
dict.SetMethod("isComponentBuild", &IsComponentBuild);
}

} // namespace
Expand Down

0 comments on commit b8dbe4b

Please sign in to comment.