system-test: only run non-local stats test if hostname is set