-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: do not propagate GDK_BACKEND env variable to subproc #1
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
set -o errexit | ||
set -o nounset | ||
|
||
rm -f /tmp/groot-says | ||
rm -f /tmp/groot | ||
rm -f ~/.local/share/applications/groot.desktop | ||
|
||
update-desktop-database ~/.local/share/applications | ||
|
||
rm -f ~/.local/share/mime/packages/groot.xml | ||
|
||
update-mime-database ~/.local/share/mime |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
|
||
set -o errexit | ||
set -o nounset | ||
|
||
cleanup () { | ||
exec "./after-test.sh" | ||
} | ||
|
||
trap cleanup HUP INT | ||
|
||
# Install the application Groot | ||
cp ./groot /tmp/ | ||
|
||
# Make sure the applications directory exists. | ||
mkdir -p ~/.local/share/applications | ||
|
||
# Register Groot as desktop application | ||
cp ./groot.desktop ~/.local/share/applications/ | ||
|
||
# Update database of desktop entries | ||
update-desktop-database ~/.local/share/applications | ||
|
||
# Make sure the packages directory exists. | ||
mkdir -p ~/.local/share/mime/packages | ||
|
||
# Associate 'application/x-groot' mime type with '*.groot' files | ||
cp ./groot.xml ~/.local/share/mime/packages/ | ||
|
||
# update the MIME database | ||
update-mime-database ~/.local/share/mime | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can u verify if these non-trivial commands are blocking? I just wanted to make sure this doesn't cause any race condition when the rest of the test expects these operations to be completed but they are actually in progress There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From the documentation, it looks like a synchronous operation as the command can print the summary There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good! Is that applicable for these too:
? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @RaisinTen Can you help me understand if these are blocking? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed the rest of the review comments and the PR is ready if we can resolve this comment |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
echo $GDK_BACKEND > /tmp/groot-says |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[Desktop Entry] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are all of these fields necessary? can we trim out some of them? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. desktop entry must have a |
||
Type=Application | ||
Exec=/tmp/groot | ||
Name=Groot | ||
MimeType=application/x-groot |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> | ||
<mime-type type="application/x-groot"> | ||
<comment>Groot File</comment> | ||
<glob weight="100" pattern="*.groot"/> | ||
</mime-type> | ||
</mime-info> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#!/bin/sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const { app, shell } = require('electron'); | ||
const path = require('path'); | ||
|
||
app.whenReady().then(async () => { | ||
await shell.openPath(path.join(__dirname, 'hello.groot')); | ||
app.quit(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the script somehow fails, it will leave the system in a mutated condition which might not be something the people who run these tests locally or on ci want. can we plz make these tests more robust by using a trap?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does having this in the afterTest help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it wouldn't help if the process receives something like a SIGINT, which can only be handled using a trap