Commit Graph

12 Commits

Author SHA1 Message Date
Benjamin Sago
eacbf55594 Start adding some special file testcases 2017-04-28 23:24:19 +01:00
Benjamin Sago
bd5095d0d0 Rename file-types tests to file-names-exts
This name more accurately reflects which code is being tested (things like .png and Makefile, rather than pipes and sockets), freeing up file-types for *actual* file types to be tested.
2017-04-28 20:07:31 +01:00
Benjamin Sago
22be5b047f Switch to an Ubuntu Vagrant image
The non-contrib Debian one doesn’t come with guest additions, meaning it used rsync instead of Virtualbox shared folders to sync files, meaning edits made in the VM didn’t get propogated back to the host, meaning I got very confused for a while.

Thanks to the parent commit, this shouldn’t be an issue at all: the default user name, which is now “ubuntu” instead of “vagrant” is specified in a lot fewer places, making it much easier to change.
2017-04-28 19:36:42 +01:00
Benjamin Sago
ef18f9ca91 Protect xtests against different default users
The Vagrant tests assumed that there’d be a user called “vagrant” that would run the tests and create the files by default. Files would be owned by vagrant:vagrant by default, and this worked, until it came time to change that username. The naïve method was a search-and-replace, but this caused problems when the new user’s name wasn’t exactly the same length as the previous one.

So to fix this, we now have our own user, named after the first animal I thought of, that makes the files’ owners and groups independent of the default user of whichever VM image the xtests are running on.

Another place where it was hard-coded was the home directory, which was “/home/vagrant”, where the awkward testcases live. That last one has been changed to just “/testcases”, which has no mention of the user in it.
2017-04-28 19:34:23 +01:00
Benjamin Sago
b885b34aa6 Protect xtests against the passage of time
There was a problem with the Vagrant tests where the year 2016 was hard-coded in as the modified date. This had to be done to make the --long tests use the correct date format, which varies depending on whether the timestamp is in the current year.

Unfortunately, time progresses [citation needed], and what was once 2016 is now 2017, so the date format changed and the tests broke.

Because the Vagrantfile is just a Ruby script, we can look up the current year at runtime and use that instead. There’s also a check added to the test runner that makes sure none of the files are more than 365 days old, because if any are, then it’s time to update the timestamps (or it’s the last day of a leap year)
2017-04-28 19:26:57 +01:00
Benjamin Sago
23ab19eb20 Merge pull request #147 from spk/use-official-jessie64
Use official vagrant jessie64
2017-04-02 02:33:39 +01:00
Laurent Arnoud
3fa3ae1595
Install pkg-config for openssl-sys 2017-04-01 00:08:41 +02:00
Laurent Arnoud
1447cf53bf
Use official vagrant jessie64 2017-02-26 13:31:43 +01:00
Ben S
ba366fc855 Add some symlink testcases 2016-10-29 19:58:34 +01:00
Ben S
36d9b6844e Add .tgz to the compressed file extensions
Fixes #129
2016-10-29 19:28:41 +01:00
Ben S
9589496aac Write some file-type integration tests 2016-10-29 19:28:20 +01:00
Benjamin Sago
54067bf765 Replace the testcases script with a Vagrant VM
See the README section for more details. Basically, with this way, we can store a bunch of existing valid exa outputs, change a VM's environment to match our values, then check that exa still works by comparing outputs.
2016-10-07 19:31:03 +01:00