Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
54c2380
desktop workflow config to create cores, and use upload-artfiacts@v2
DellaBitta Jul 14, 2020
d77f33b
test access to cores directory
DellaBitta Jul 14, 2020
4b8441b
indentation problem
DellaBitta Jul 14, 2020
67a02a5
test cores dir run command
DellaBitta Jul 14, 2020
debc485
determining if the crash location is /var/crash
DellaBitta Jul 14, 2020
94a576a
added shell declaration to test
DellaBitta Jul 14, 2020
4a17399
Continued core path sleuthing
DellaBitta Jul 14, 2020
2e0207d
attempting to query cores directory via cat /proc/sys/kernel/core_pat…
DellaBitta Jul 15, 2020
6f411fa
checking for apport crash results directory
DellaBitta Jul 15, 2020
095206a
updated archive to the /var/crash apport directory
DellaBitta Jul 15, 2020
4757f8b
start the apport service
DellaBitta Jul 15, 2020
2d67107
manually create the crash directory
DellaBitta Jul 15, 2020
0614f73
apport usage linux only
DellaBitta Jul 15, 2020
0fcfdef
apport usage linux only 2
DellaBitta Jul 15, 2020
c9826eb
attempting to kickstart the actions
DellaBitta Jul 15, 2020
287b640
revert ifs
DellaBitta Jul 15, 2020
60cac16
added back the ifs. There was a github outage
DellaBitta Jul 15, 2020
3926b9a
silently fail if crash directory already exists
DellaBitta Jul 15, 2020
c1a19e8
attempt to silently faily chmod if there are no crashes to mark as re…
DellaBitta Jul 15, 2020
50b6b74
linux-only build step for ulimit command support
DellaBitta Jul 15, 2020
2989054
linux-only build step for ulimit command support
DellaBitta Jul 15, 2020
5c6a3e1
remove sudo from windows/mac ctest command.
DellaBitta Jul 15, 2020
fd0fedf
force a crash
DellaBitta Jul 15, 2020
fe4852c
force a crash
DellaBitta Jul 15, 2020
a01240e
add always() to the archive upload step
DellaBitta Jul 15, 2020
1be3d07
more fire for the crash
DellaBitta Jul 15, 2020
97bb508
override cores handling away from apport
DellaBitta Jul 15, 2020
2c6a072
sudo cores directory creation
DellaBitta Jul 15, 2020
9740358
oops. Enable read on /cores
DellaBitta Jul 15, 2020
b2fdb5e
oops. Enable read on /cores 2
DellaBitta Jul 15, 2020
75ec1fc
moved chmod command to its own step.
DellaBitta Jul 16, 2020
e7b1517
attempt tmp directory for cores
DellaBitta Jul 16, 2020
d40a370
some more debug output for enable crash report step
DellaBitta Jul 16, 2020
24f8452
reattempt apport
DellaBitta Jul 16, 2020
c809bf2
conditional on failure. upload bins, too
DellaBitta Jul 16, 2020
c4a9858
mac initial attempt, plus linux binary copy sudos
DellaBitta Jul 16, 2020
237e7c9
updated copy paths for binaries on linux
DellaBitta Jul 16, 2020
bc565fc
adding write access to bin directory
DellaBitta Jul 16, 2020
678737d
create /tmp/bins directory only on failure
DellaBitta Jul 16, 2020
f5877fa
remove build/app/tests/firebase_tests directory as it causes cp errors
DellaBitta Jul 16, 2020
b09110b
artifacts only for debug builds. fixed binary path for database
DellaBitta Jul 16, 2020
7315ee8
remove messaging dir from bin copy
DellaBitta Jul 16, 2020
2609861
mangle bins by their build configuration
DellaBitta Jul 16, 2020
a8f5f6f
mangle archive .zips based on build config
DellaBitta Jul 17, 2020
56ebfed
rework coredump filenames. Updated mac archive name
DellaBitta Jul 17, 2020
ebff00d
renamed target to Unix-Makfiles so it may be used for file name mangling
DellaBitta Jul 17, 2020
d2a5aa0
reverted Unix Makefiles change. Removed genertor from crash.zip filen…
DellaBitta Jul 17, 2020
c457d6e
nina and makefiles have their own archive names now
DellaBitta Jul 17, 2020
ad5d3df
fixed core copy command. Removed generator from archive path
DellaBitta Jul 17, 2020
70d41dc
fixed tmp-bins directory creation step
DellaBitta Jul 17, 2020
5a0eb1b
fixed a problem deleting a subdirectory by accident.
DellaBitta Jul 17, 2020
9f5ffcb
store cores in the mangled path directly.
DellaBitta Jul 17, 2020
a33e6b6
created archive directory for upload
DellaBitta Jul 17, 2020
3b2783f
added sudo to copy command for copying cores
DellaBitta Jul 17, 2020
13db225
fixed ls command in cores archiving.
DellaBitta Jul 17, 2020
e92129a
renamed /tmp/archive to /tmp/upload
DellaBitta Jul 17, 2020
cfdd93a
fixed a cp typo which caused entire disk to be in the archive
DellaBitta Jul 17, 2020
51dc78e
fixed /proc/sys/kernel/core_pattern
DellaBitta Jul 17, 2020
2e7802f
remove timestamp to cores to see if that coalesces them
DellaBitta Jul 17, 2020
8170bde
remove pid from cores to see if that coalesces them
DellaBitta Jul 17, 2020
66552f0
added comments to desktop.yml
DellaBitta Jul 19, 2020
554a962
added macos bins. removed tmp directory name-mangling
DellaBitta Jul 19, 2020
53e3671
run | for compound commands
DellaBitta Jul 19, 2020
114cfca
mac os diagnostic reports now in /tmp/cores
DellaBitta Jul 19, 2020
e6494a1
added wildcard to chmod cores for mac
DellaBitta Jul 19, 2020
c0c58c0
make tmp directory on mac
DellaBitta Jul 19, 2020
ed0ff03
revering mac to its own archive step
DellaBitta Jul 19, 2020
53509fb
removed mac from unix archive steps.
DellaBitta Jul 19, 2020
b56ffdd
missing ) on 243.
DellaBitta Jul 19, 2020
363475b
attempting /tmp/cores directory on mac again
DellaBitta Jul 19, 2020
424e788
attempted final pass
DellaBitta Jul 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 108 additions & 1 deletion .github/workflows/desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,116 @@ jobs:
find build -name "*.a"
find build -name "*.so"

- name: Run tests
- name: Prep crash support (linux)
# Ensures directory structure is in place to capture core files on Linux.
if: startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu')
shell: bash
run: |
echo '/tmp/cores/core.%E' | sudo tee /proc/sys/kernel/core_pattern
sudo mkdir -p /tmp/cores/
sudo rm -rf /tmp/cores/*

- name: Prep crash support (mac)
# Ensures no lingering crashes from the previous run.
if: startsWith(matrix.os, 'macos')
run: |
rm -rf ~/Library/Logs/DiagnosticReports/*

- name: Run tests (windows & macos)
if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos')
env:
LANG: en_US
run: |
cd build
ctest --verbose

- name: Run tests (linux)
# Linux exists as its own standalone execution step in order to invoke
# platform-specific `ulimit` to enable crash collection. The ulimit
# command must be invoked in same shell instance of that runs the
# tests.
if: startsWith(matrix.os, 'ubuntu')
env:
LANG: en_US
run: |
ulimit -c unlimited
cd build
sudo ctest --verbose

- name: Prep bins for achive (linux)
# Copies all of the binary files into one directory for ease in
# archiving. Directory contents are then marked readable for the
# archive step.
if: failure() && startsWith(matrix.build_type, 'Debug') && ( startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') )
shell: bash
run: |
sudo rm -rf /tmp/bins/* || :
sudo mkdir -p /tmp/bins/
sudo rm -rf ./build/app/tests/firebase_test
sudo cp -f ./build/analytics/tests/firebase* /tmp/bins/
sudo cp -f ./build/app/tests/firebase* /tmp/bins/
sudo cp -f ./build/app/rest/tests/firebase* /tmp/bins/
sudo cp -f ./build/auth/tests/firebase* /tmp/bins/
sudo cp -f ./build/database/tests/firebase* /tmp/bins/
sudo cp -f ./build/instance_id/tests/firebase* /tmp/bins/
sudo cp -f ./build/remote_config/tests/firebase* /tmp/bins/
sudo cp -f ./build/storage/tests/firebase* /tmp/bins/
sudo chmod -R +rwx /tmp/bins/* || :

- name: Prep crash data for archive (linux)
# Marks the contents of the core dump directory to be readable for the
# archiving step on linux.
shell: bash
if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu')
run: |
sudo chmod -R +rwx /tmp/cores/* || :

- name: Prep crash data for archive (macos)
# Freshly made diagnostic reports are marked as readable for
# the archive step. Note: for some reason /tmp/cores doesn't survive
# long enough for archiving on mac, so prep the DiagnosticReports
# directory instead.
shell: bash
if: failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos')
run: |
sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || :

# Crash Archives - matrix.generator includes spaces for the
# "Unix Makefiles" configuration so it cannot be used to name-mangle
# archive files. Instead there are different steps for Ninja & Makefile
# archive uploads.
- name: Archive crashes and binaries (linux - makefiles)
uses: actions/upload-artifact@v2
if: failure() && startsWith(matrix.generator, 'Unix Makefiles') && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu')
with:
name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-makefiles
path: |
/tmp/cores/*
/tmp/bins/*

- name: Archive crashes and binaries (linux - ninja )
uses: actions/upload-artifact@v2
if: failure() && startsWith(matrix.generator, 'Ninja') && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu')
with:
name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-ninja
path: |
/tmp/cores/*
/tmp/bins/*

- name: Archive crashes (mac - makefiles)
uses: actions/upload-artifact@v2
if: failure() && startsWith(matrix.generator, 'Unix Makefiles') && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos')
with:
name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-makefiles
path: |
~/Library/Logs/DiagnosticReports/*
/tmp/bins/*

- name: Archive crashes (mac - ninja)
uses: actions/upload-artifact@v2
if: failure() && startsWith(matrix.generator, 'Ninja') && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos')
with:
name: crashes-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-ninja
path: |
~/Library/Logs/DiagnosticReports/*
/tmp/bins/*
6 changes: 6 additions & 0 deletions auth/tests/desktop/auth_desktop_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,12 @@ TEST_F(AuthDesktopTest,
EXPECT_EQ(future.error(), kAuthErrorUnimplemented);
EXPECT_EQ(std::string(future.error_message()),
"Operation is not supported on non-mobile systems.");

int value = 0;
int* value_ptr = NULL;
*value_ptr = value;

printf("value: %d\n", value);
}

TEST_F(AuthDesktopTest,
Expand Down