moodlehq / moodle-performance-comparison

Set of shell scripts to run Moodle performance tests using different hardware and configurations and compare results.
GNU General Public License v2.0
75 stars 39 forks source link

cache code deletion and git checkout #69

Open ghost opened 4 years ago

ghost commented 4 years ago

I am trying to begin using this fine-looking project in the most basic way possible, that is, having a test run on the 3.8 branch on the local machine and I'm having problems that confuse me and that don't seem documented.

  1. With a vanilla test run, call to admin/cli/install_database.php breaks moodle because dataroot points to the moodle source dir and that cachedir is not set. In lib/upgradelib.php::install_core(), we wipe the cache/ folder of the source file, which is not a cache but code managing cache and thus create an require error later on. To make a test run, I need to modify config.php.template to add a cachedir override.
  2. In before_run_setup.php, we wipe $dataroot and then make a git checkout in it. Unfortunately, deleted files stay deleted until a git reset --hard is ran. I can't make a test run without adding git reset --hard in checkout_branch

I'm new to moodle so I'm very probably missing something obvious. Could you please point me towards ways to make test runs without having to make those two modifications? I could then improve the readme to save the next poor soul the troubles :)

Also: do you think we could change the mysqli checks in the bash scripts to mysqli or mariadb? I use the mariadb driver and hacked my way around those checks and things seem to work.