summarylogtreecommitdiffstats
path: root/.SRCINFO
AgeCommit message (Collapse)Author
2019-07-05Perform integration tests in addtion to unit testsneoninteger
* The integration tests (which actually communicate with the Turtl server) are now run during the check() step in addition to the regular unit tests. * Some of the integration tests do not work (authentication error resulting in the test repeatedly trying and failing to sync with the server) and I have no idea why, so for now those tests have just been disabled. * Change the provided server configuration to allow unconfirmed invites, to allow the respective integration test to work * I now export the OpenSSL paths directly rather than using vars.mk * The 'make' calls have been replaced with direct calls to 'cargo'
2019-06-21Move core/server configuration into separate configuration filesneoninteger
* For the core-rs tests, this is simply copying a pre-made file instead of using sed to patch the template configuration. * For the server, this is a little bit harder. The server does not support loading a custom configuration from anywhere on the system, so I copy all of the server's JavaScript files into a directory within $srcdir, copy the custom configuration and then launch the server from within $srcdir. * This has the benefit of ensuring that the servers are running with a fully custom configuration, rather than using exported variables and sed patches against a user-controlled config.
2019-06-21Implement more foolproof check() stepneoninteger
* The check() step has been divided into "modules" which can be run independently of each other. * This then allows the individual steps (create directories -> initialise database cluster and start SQL server -> configure database and start Turtl server -> generate configuration and run tests -> shut down Turtl server -> shut down SQL server -> remove directories) to be run individually, with traps set up to perform the necessary de-initialization should one step fail. * This is important as makepkg's default behaviour is to stop as soon as a command returns with a non-zero exit code. Trapping errors in this manner allows us to perform the proper database and server cleanup regardless of whether or not the tests succeeded. * The output of commands is also no longer redirected to /dev/null, and the log messages are bolded and coloured to look like makepkg messages.
2019-06-14Add test suite to build processneoninteger
* The check() function will now do the following: create a PostgreSQL database cluster, start a PostgreSQL server, create a role and database in the cluster for Turtl to use, initialize the database and upload directory for the Turtl server, start the Turtl server as a background job, run the core-rs tests, shut down the Turtl and SQL servers and clean up after itself. * For most commands, the standard output is either silenced with command line flags or is redirected to /dev/null, to show only errors that occur during the process. * This of course requires you to have turtl-server installed. * Please note that this package creates a release build during the build() step, whereas in order to run the tests, a debug build has to be made. This will result in the program being built twice - if this is unacceptable you can run makepkg with --nocheck to skip running the test suites. This will also remove the dependency on turtl-server.
2019-06-09Initial basic package for core-rsneoninteger