Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-qtype_stack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-qtype_stack
Commits
4793373b
Commit
4793373b
authored
3 years ago
by
Tim Hunt
Browse files
Options
Downloads
Patches
Plain Diff
Option to skip trying to build maxima-optimised when installing for test
parent
10517792
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
db/install.php
+1
-1
1 addition, 1 deletion
db/install.php
doc/en/Developer/Unit_tests.md
+10
-0
10 additions, 0 deletions
doc/en/Developer/Unit_tests.md
tests/fixtures/test_maxima_configuration.php
+1
-1
1 addition, 1 deletion
tests/fixtures/test_maxima_configuration.php
with
12 additions
and
2 deletions
db/install.php
+
1
−
1
View file @
4793373b
...
...
@@ -77,7 +77,7 @@ function xmldb_qtype_stack_install() {
set_config
(
'casdebugging'
,
1
,
'qtype_stack'
);
set_config
(
'mathsdisplay'
,
'mathjax'
,
'qtype_stack'
);
if
(
!
defined
(
'QTYPE_STACK_TEST_CONFIG_PLATFORM'
)
||
QTYPE_STACK_TEST_CONFIG_PLATFORM
!==
'server'
)
{
if
(
!
defined
(
'QTYPE_STACK_TEST_CONFIG_PLATFORM'
)
||
!
in_array
(
QTYPE_STACK_TEST_CONFIG_PLATFORM
,
[
'server'
,
'none'
])
)
{
list
(
$ok
,
$message
)
=
stack_cas_configuration
::
create_auto_maxima_image
();
if
(
!
$ok
)
{
throw
new
coding_exception
(
'maxima_opt_auto creation failed.'
,
$message
);
...
...
This diff is collapsed.
Click to expand it.
doc/en/Developer/Unit_tests.md
+
10
−
0
View file @
4793373b
...
...
@@ -65,6 +65,16 @@ Commands are
(where folder-name is the folder that you want to contains the report)
If, for some reason, you have the STACK code in your codebase, and you want to run other
unit tests on a server without Maxima installed, then you will get an error when you
try to install the PHPunit site. You can avoid that by putting
define('QTYPE_STACK_TEST_CONFIG_PLATFORM', 'none');
in your config.php file. This will prevent the install from trying to create maxima-optimised.
It will also cause most of the STACK unit tests to be skipped.
## Stop resetting the dataroot directory.
...
...
This diff is collapsed.
Click to expand it.
tests/fixtures/test_maxima_configuration.php
+
1
−
1
View file @
4793373b
...
...
@@ -38,7 +38,7 @@ abstract class qtype_stack_test_config {
// because auto-optimse worked during install, or
// settings given in config.php.
return
get_config
(
'qtype_stack'
,
'platform'
)
!==
'linux'
||
defined
(
'QTYPE_STACK_TEST_CONFIG_PLATFORM'
);
(
defined
(
'QTYPE_STACK_TEST_CONFIG_PLATFORM'
)
&&
QTYPE_STACK_TEST_CONFIG_PLATFORM
!==
'none'
)
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment