make test fails after sudo make install
After running "sudo make install", some of the tests from "make test" fail.
The root cause is that "sudo make install" creates a folder and a file in the build folder whose owner is root. If "make test" is run after "sudo make install", two tests fail due to inability to cleanup files. The problem files are: build/etc/eosio/node_00 build/etc/eosio/node_00/genesis.json
If the files already exist, then "sudo make install" does not mess with them. So if you "chown" the files to something you can remove without sudo, "sudo make install" does not chown them back to root. "make test" removes the whole node_00 folder when its successfully completes, and the problem disappears until the next time you do a "sudo make install". So, to work around the issue to get "make test" to pass, you can either rm -rf etc/eosio/node_00 or chown both files.
The problem can be masked if you have environment variable EOSIO_ROOT set (which some of our documentation has recommended). I had EOSIO_ROOT set and had a hard time pinning down the problem. This problem exhibited itself by not being able to make the problem go away even when blowing away the build folder and rebuilding. Unsetting EOSIO_ROOT makes the behavior more predictable.
Acceptance Test Criteria:
- Running "make test" after running "sudo make install" passes all tests.
- Files build/etc/eosio/node_00 and build/etc/eosio/node_00/genesis.json are not installed by "sudo make install"
Passed ATC