aboutsummaryrefslogtreecommitdiff
path: root/bin/mechnical-rob
diff options
context:
space:
mode:
authorzsloan2018-04-02 15:55:50 +0000
committerzsloan2018-04-02 15:55:50 +0000
commit7bd041f66cc4f2548a132e4d69d6533b81f005fc (patch)
treeee77d99cb35c85e7c27da7c55543631b44f1ab22 /bin/mechnical-rob
parentb17b78a46aec1ca515bfef7168232020cf09a151 (diff)
parent92e89794fa57ef1570631403a8ceebf52a2cbc08 (diff)
downloadgenenetwork2-7bd041f66cc4f2548a132e4d69d6533b81f005fc.tar.gz
Merge branch 'testing' of github.com:genenetwork/genenetwork2 into testing
Diffstat (limited to 'bin/mechnical-rob')
-rwxr-xr-xbin/mechnical-rob111
1 files changed, 0 insertions, 111 deletions
diff --git a/bin/mechnical-rob b/bin/mechnical-rob
deleted file mode 100755
index be223d94..00000000
--- a/bin/mechnical-rob
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/usr/bin/env ruby
-
-
-USAGE = <<EOT
-This is Mechanical-Rob - an automated web server tester for
- Genenetwork.org that uses the brilliant
- mechanize gem with minitest.
-
-To use this software you need to install mechanize. Run it from
-the root of the genenetwork2 source tree as, for example,
-
- ./bin/test-website http://localhost:5003/ (default)
-
-If you are using the small deployment database you can use
-
- ./bin/test-website --skip -n
-
-To run all tests
-
- ./bin/test-website --all
-
-To run individual tests on localhost you can do
-
- ruby -Itest -Itest/lib test/lib/mapping.rb --name="/Mapping/"
-
-For more information see http://genenetwork.org/
-
-EOT
-$stderr.print USAGE
-
-require 'optparse'
-
-options = { database: :small, link_checker: false}
-opts = OptionParser.new do |o|
- o.banner = "Usage: #{File.basename($0)} [options] URL"
-
- o.on('-d','--database', String, 'Use database (default db_webqtl_s)') do |s|
- options[:database] =
- case s
- when 'xx'
- :unknown
- else
- :small
- end
- end
-
- o.on('--all', 'Run all tests') do
- options[:all] = true
- end
-
- o.on('-l','--link-checker', 'Check for dead links') do
- options[:link_checker] = true
- end
-
- o.on('--navigation', 'Check for navigation') do
- options[:navigation] = true
- end
-
- o.on('--mapping', 'Check for mapping') do
- options[:mapping] = true
- end
-
- o.on('--skip-broken', 'Skip tests that are known to be broken') do
- options[:skip_broken] = true
- end
-
- o.separator ""
- o.on_tail('-h', '--help', 'display this help and exit') do
- options[:show_help] = true
- end
-end
-
-opts.parse!(ARGV)
-
-if options[:show_help]
- print opts
- exit 1
-end
-
-$options = options # we are using a global here
-$host =
- if ARGV.size>0
- ARGV.shift
- else
- "http://localhost:5003"
- end
-
-$stderr.print "Testing <",$host,">\n"
-
-require 'mechanize'
-require 'minitest/spec'
-require 'minitest/autorun'
-
-# These are the actual testing modules
-
-libpath = File.dirname(File.dirname(__FILE__))
-$: << File.join(libpath,'test/lib')
-
-require 'main_web_functionality'
-
-if options[:all] or options[:mapping]
- require 'mapping'
-end
-
-if options[:all] or options[:link_checker]
- require 'link_checker'
-end
-
-if options[:all] or options[:navigation]
- require 'navigation'
-end