From 2964308bfe38cc572a31e7256e583ddd390b9a72 Mon Sep 17 00:00:00 2001 From: Chris Heald Date: Mon, 5 Mar 2018 09:14:43 -0700 Subject: [PATCH] Fix DB paths for darwin and windows Add travis to the firebird group so it can validate FB file existence Ensure DBs dir exists and is chown'd, reload groups after travis assignment Fix group memebership per travis docs When a scalpel doesn't work, try a sledgehammer --- .travis.yml | 3 +++ test/test_helper.rb | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f5ddeca..aa96f57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,9 @@ install: before_script: - export ISC_PASSWORD=$(sudo grep ISC_PASSWORD /etc/firebird/2.5/SYSDBA.password | ruby -e "puts STDIN.read.split(/[=\"]/)[2]") - echo "modify sysdba -pw masterkey" | gsec -user SYSDBA -password $ISC_PASSWORD + - sudo mkdir -p /tmp/firebird + - sudo chown firebird.firebird /tmp/firebird + - sudo chmod 0777 /tmp/firebird script: - bundle exec rake compile:fb_ext test rvm: diff --git a/test/test_helper.rb b/test/test_helper.rb index 781b575..c1d1014 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -41,7 +41,13 @@ def teardown def get_db_conn_params(dbname = nil) dbname ||= "drivertest.%s.fdb" % SecureRandom.hex(24) - db_file = File.join(Dir.tmpdir, dbname) + + db_file = case RUBY_PLATFORM + when /win32/ + File.join("c:", "var", "fbdata", dbname) + else + File.join("/", "tmp", "firebird", dbname) + end { :database => "localhost:#{db_file}", :username => "sysdba",