diff --git a/backend/test-runner.js b/backend/test-runner.js index 7b290aa..cccc686 100644 --- a/backend/test-runner.js +++ b/backend/test-runner.js @@ -123,7 +123,7 @@ class Test { timeout = setTimeout(() => { this.timedOut = true; this.handleUpdate(); - }, TIMEOUT * 1000 * PATIENCE); + }, TIMEOUT * 1000 * PATIENCE * (this.config.timeoutFactor || 1)); await session.setup(); switch (this.type) { case "ensure": diff --git a/langs/carp.yaml b/langs/carp.yaml index 227d5bf..2929129 100644 --- a/langs/carp.yaml +++ b/langs/carp.yaml @@ -45,3 +45,5 @@ run: | scope: code: | (def x (* 123 234)) + +timeoutFactor: 4 diff --git a/lib/jsonschema.yaml b/lib/jsonschema.yaml index 6da6860..7bef51d 100644 --- a/lib/jsonschema.yaml +++ b/lib/jsonschema.yaml @@ -961,6 +961,18 @@ properties: type: string minLength: 1 + timeoutFactor: + title: "Per-language multiplier for test timeouts" + description: | + Some languages are slow. To account for this, Riju's test + timeouts are fairly forgiving. However, some languages are not + just slow but absolutely GLACIAL. To deal with these, you can + specify 'timeoutFactor' as an integer multiplier for the test + timeout (default or user-supplied) that would otherwise be used + for the language. + type: integer + minimum: 1 + default: 1 skip: type: array items: diff --git a/packer/provision-web.bash b/packer/provision-web.bash index 77232f2..62a4bb1 100644 --- a/packer/provision-web.bash +++ b/packer/provision-web.bash @@ -55,13 +55,13 @@ sudo mv /tmp/riju.service /tmp/riju.slice /etc/systemd/system/ sudo mv /tmp/cloudwatch.json /opt/aws/amazon-cloudwatch-agent/bin/config.json sudo mv /tmp/riju-init-volume /tmp/riju-supervisor /usr/local/bin/ -sudo sed -Ei 's/^#?PermitRootLogin .*/PermitRootLogin no/' /etc/ssh/sshd_config -sudo sed -Ei 's/^#?PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config -sudo sed -Ei 's/^#?PermitEmptyPasswords .*/PermitEmptyPasswords no/' /etc/ssh/sshd_config -sudo sed -Ei "s/\\\$AWS_REGION/${AWS_REGION}/" /etc/systemd/system/riju.service -sudo sed -Ei "s/\\\$FATHOM_SITE_ID/${FATHOM_SITE_ID:-}/" /etc/systemd/system/riju.service -sudo sed -Ei "s/\\\$S3_BUCKET/${S3_BUCKET}/" /etc/systemd/system/riju.service -sudo sed -Ei "s/\\\$SENTRY_DSN/${SENTRY_DSN:-}/" /etc/systemd/system/riju.service +sudo sed -Ei 's|^#?PermitRootLogin .*|PermitRootLogin no|' /etc/ssh/sshd_config +sudo sed -Ei 's|^#?PasswordAuthentication .*|PasswordAuthentication no|' /etc/ssh/sshd_config +sudo sed -Ei 's|^#?PermitEmptyPasswords .*|PermitEmptyPasswords no|' /etc/ssh/sshd_config +sudo sed -Ei "s|\\\$AWS_REGION|${AWS_REGION}|" /etc/systemd/system/riju.service +sudo sed -Ei "s|\\\$FATHOM_SITE_ID|${FATHOM_SITE_ID:-}|" /etc/systemd/system/riju.service +sudo sed -Ei "s|\\\$S3_BUCKET|${S3_BUCKET}|" /etc/systemd/system/riju.service +sudo sed -Ei "s|\\\$SENTRY_DSN|${SENTRY_DSN:-}|" /etc/systemd/system/riju.service sudo sed -Ei "s|\\\$SUPERVISOR_ACCESS_TOKEN|${SUPERVISOR_ACCESS_TOKEN}|" /etc/systemd/system/riju.service sudo passwd -l root