Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions .evergreen/buildvariants-and-tasks.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ const PACKAGE_BUILD_VARIANTS = [
];

const SMOKETEST_BUILD_VARIANTS = [
// {
// name: 'smoketest-ubuntu',
// display_name: 'Smoketest Ubuntu',
// run_on: 'ubuntu2004-large',
// depends_on: 'package-ubuntu',
// },
{
name: 'smoketest-ubuntu',
display_name: 'Smoketest Ubuntu',
run_on: 'ubuntu2004-large',
depends_on: 'package-ubuntu',
},
{
name: 'smoketest-windows',
display_name: 'Smoketest Windows',
Expand Down
8 changes: 8 additions & 0 deletions .evergreen/buildvariants-and-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ buildvariants:
- name: package-compass
- name: package-compass-isolated
- name: package-compass-readonly
- name: smoketest-ubuntu-compass
display_name: Smoketest Ubuntu (compass)
run_on: ubuntu2004-large
depends_on:
- name: package-compass
variant: package-ubuntu
tasks:
- name: smoketest-compass
- name: smoketest-windows-compass
display_name: Smoketest Windows (compass)
run_on: windows-vsCurrent-large
Expand Down
12 changes: 6 additions & 6 deletions .evergreen/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -692,15 +692,15 @@ functions:
npm run --unsafe-perm --workspace @mongodb-js/compass-smoke-tests start -- --package=osx_dmg --tests=time-to-first-query
fi

#if [[ "$IS_UBUNTU" == "true" ]]; then
if [[ "$IS_UBUNTU" == "true" ]]; then
# TODO: linux_deb
# TODO: linux_tar
#fi
npm run --unsafe-perm --workspace @mongodb-js/compass-smoke-tests start -- --package=linux_tar --tests=time-to-first-query
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case it should be safe to run autoupdate-from because it won't auto-update, but it will tell the user that there is an update. And there's test code for that.

But we can also enable that in a separate PR.

fi

#if [[ "$IS_RHEL" == "true" ]]; then
if [[ "$IS_RHEL" == "true" ]]; then
# TODO: linux_rpm
# TODO: rhel_tar
#fi
npm run --unsafe-perm --workspace @mongodb-js/compass-smoke-tests start -- --package=linux_tar --tests=time-to-first-query
fi

test-web-sandbox:
- command: shell.exec
Expand Down
3 changes: 3 additions & 0 deletions packages/compass-smoke-tests/src/installers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { installMacZIP } from './mac-zip';
import { installWindowsZIP } from './windows-zip';
import { installWindowsMSI } from './windows-msi';
import { installWindowsSetup } from './windows-setup';
import { installLinuxTar } from './linux-tar';

export function getInstaller(kind: PackageKind) {
if (kind === 'osx_dmg') {
Expand All @@ -16,6 +17,8 @@ export function getInstaller(kind: PackageKind) {
return installWindowsMSI;
} else if (kind === 'windows_setup') {
return installWindowsSetup;
} else if (kind === 'linux_tar') {
return installLinuxTar;
} else {
throw new Error(`Installer for '${kind}' is not yet implemented`);
}
Expand Down
25 changes: 25 additions & 0 deletions packages/compass-smoke-tests/src/installers/linux-tar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import path from 'node:path';

import type { InstalledAppInfo, InstallablePackage } from './types';
import { execute } from '../execute';

export function installLinuxTar({
appName,
filepath,
destinationPath,
}: InstallablePackage): InstalledAppInfo {
const appFilename = `${appName}-linux-x64`;
const appPath = path.resolve(destinationPath, appFilename);

execute('tar', ['-xzvf', filepath, '-C', destinationPath]);

// Check that the executable will run without being quarantined or similar
execute('xvfb-run', [path.resolve(appPath, appName), '--version']);

return {
appPath,
uninstall: async function () {
/* TODO */
},
};
}
Loading