test_ids 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3cc056bd639bd5288a0ed73842d5790de1beaf2d8ef53aefe004376fd2647ca2
4
- data.tar.gz: 75ee0869b2c5d8a9e0e0ec75d9125bd8ad5286a1490af80e95ddcd986874b12e
3
+ metadata.gz: d358c2adcb8219fc81608948ddc5081c25774393be286ca3e6f6ac7661ba2da3
4
+ data.tar.gz: 8fdc97199d75ef15e06c28057f0c4ef455df5631ff730ed917a51d3728fb31d7
5
5
  SHA512:
6
- metadata.gz: ca98189aaf0d39ba9b4f7acac86354e5f6afa2c537dc3e6f70ebcce6413e607aeca2ed722f548c761432306729163c1b893ca4a10bbf2b711b217cd2418bfc58
7
- data.tar.gz: 86b3b1023d650d963adf0cc4998dda002bec9bd925b4ac20e414f4215a765101ca7c8e5a8dfd84024eec4808e17fb61ca425a150218357955c622dc5d22d0bfc
6
+ metadata.gz: 6bf8c0ad0421c6fabd3d6e0042d273596fa887cef60a7029187e6929099d2fe3c18a5c905df0cbaa1f0c0619b30650d60c8378096c9e151541912a20a0ea9e1c
7
+ data.tar.gz: 3bd3882e560dda2bcfc021ac55971ca1eb4677aa8c738610a631567c1b30c345e365f4db9f86d9a2f3e2559480d7e72178796344a207226384ad859b6ae0fe92
@@ -1,23 +1,24 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'origen'
2
4
  class TestIdsApplication < Origen::Application
3
-
4
5
  # See http://origen-sdk.org/origen/api/Origen/Application/Configuration.html
5
6
  # for a full list of the configuration options available
6
7
 
7
8
  # These attributes should never be changed, the duplication here will be resolved in future
8
9
  # by condensing these attributes that do similar things
9
- self.name = "test_ids"
10
- self.namespace = "TestIds"
11
- config.name = "test_ids"
12
- config.initials = "TestIds"
10
+ self.name = 'test_ids'
11
+ self.namespace = 'TestIds'
12
+ config.name = 'test_ids'
13
+ config.initials = 'TestIds'
13
14
  # Change this to point to the revision control repository for this plugin
14
- config.rc_url = "ssh://git@github.com:Origen-SDK/test_ids.git"
15
+ config.rc_url = 'ssh://git@github.com:Origen-SDK/test_ids.git'
15
16
  config.release_externally = true
16
17
 
17
18
  # To enable deployment of your documentation to a web server (via the 'origen web'
18
19
  # command) fill in these attributes.
19
- config.web_directory = "git@github.com:Origen-SDK/Origen-SDK.github.io.git/test_ids"
20
- config.web_domain = "http://origen-sdk.org/test_ids"
20
+ config.web_directory = 'git@github.com:Origen-SDK/Origen-SDK.github.io.git/test_ids'
21
+ config.web_domain = 'http://origen-sdk.org/test_ids'
21
22
 
22
23
  # When false Origen will be less strict about checking for some common coding errors,
23
24
  # it is recommended that you leave this to true for better feedback and easier debug.
@@ -29,46 +30,46 @@ class TestIdsApplication < Origen::Application
29
30
  # Require the lint tests to pass before allowing a release to proceed
30
31
  run_on_tag: true,
31
32
  # Auto correct violations where possible whenever 'origen lint' is run
32
- auto_correct: true,
33
+ auto_correct: true
33
34
  # Limit the testing for large legacy applications
34
- #level: :easy,
35
+ # level: :easy,
35
36
  # Run on these directories/files by default
36
- #files: ["lib", "config/application.rb"],
37
+ # files: ["lib", "config/application.rb"],
37
38
  }
38
39
 
39
40
  config.shared = {
40
- command_launcher: "config/shared_commands.rb"
41
+ command_launcher: 'config/shared_commands.rb'
41
42
  }
42
43
 
43
44
  config.semantically_version = true
44
45
 
45
46
  # An example of how to set application specific LSF parameters
46
- #config.lsf.project = "msg.te"
47
-
47
+ # config.lsf.project = "msg.te"
48
+
48
49
  # An example of how to specify a prefix to add to all generated patterns
49
- #config.pattern_prefix = "nvm"
50
+ # config.pattern_prefix = "nvm"
50
51
 
51
52
  # An example of how to add header comments to all generated patterns
52
- #config.pattern_header do
53
+ # config.pattern_header do
53
54
  # cc "This is a pattern created by the example origen application"
54
- #end
55
+ # end
55
56
 
56
57
  # By default all generated output will end up in ./output.
57
58
  # Here you can specify an alternative directory entirely, or make it dynamic such that
58
- # the output ends up in a setup specific directory.
59
- #config.output_directory do
59
+ # the output ends up in a setup specific directory.
60
+ # config.output_directory do
60
61
  # "#{Origen.root}/output/#{$dut.class}"
61
- #end
62
+ # end
62
63
 
63
64
  # Similarly for the reference files, generally you want to setup the reference directory
64
65
  # structure to mirror that of your output directory structure.
65
- #config.reference_directory do
66
+ # config.reference_directory do
66
67
  # "#{Origen.root}/.ref/#{$dut.class}"
67
- #end
68
-
68
+ # end
69
+
69
70
  # This will automatically deploy your documentation after every tag
70
- def after_release_email(tag, note, type, selector, options)
71
- command = "origen web compile --remote --api"
71
+ def after_release_email(_tag, _note, _type, _selector, _options)
72
+ command = 'origen web compile --remote --api'
72
73
  Dir.chdir Origen.root do
73
74
  system command
74
75
  end
@@ -76,20 +77,20 @@ class TestIdsApplication < Origen::Application
76
77
 
77
78
  # Ensure that all tests pass before allowing a release to continue
78
79
  def validate_release
79
- if !system("origen specs") || !system("origen examples")
80
+ if !system('origen specs') || !system('origen examples')
80
81
  puts "Sorry but you can't release with failing tests, please fix them and try again."
81
82
  exit 1
82
83
  else
83
- puts "All tests passing, proceeding with release process!"
84
+ puts 'All tests passing, proceeding with release process!'
84
85
  end
85
86
  end
86
-
87
+
87
88
  # To enabled source-less pattern generation create a class (for example PatternDispatcher)
88
89
  # to generate the pattern. This should return false if the requested pattern has been
89
90
  # dispatched, otherwise Origen will proceed with looking up a pattern source as normal.
90
- #def before_pattern_lookup(requested_pattern)
91
+ # def before_pattern_lookup(requested_pattern)
91
92
  # PatternDispatcher.new.dispatch_or_return(requested_pattern)
92
- #end
93
+ # end
93
94
 
94
95
  # If you use pattern iterators you may come across the case where you request a pattern
95
96
  # like this:
@@ -97,11 +98,10 @@ class TestIdsApplication < Origen::Application
97
98
  #
98
99
  # However it cannot be found by Origen since the pattern name is actually example_pat_bx.atp
99
100
  # In the case where the pattern cannot be found Origen will pass the name to this translator
100
- # if it exists, and here you can make any substitutions to help Origen find the file you
101
+ # if it exists, and here you can make any substitutions to help Origen find the file you
101
102
  # want. In this example any instances of _b\d, where \d means a number, are replaced by
102
103
  # _bx.
103
- #config.pattern_name_translator do |name|
104
+ # config.pattern_name_translator do |name|
104
105
  # name.gsub(/_b\d/, "_bx")
105
- #end
106
-
106
+ # end
107
107
  end
data/config/boot.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file is used to boot your plugin when it is running in standalone mode
2
4
  # from its own workspace - i.e. when the plugin is being developed.
3
5
  #
@@ -8,12 +10,12 @@
8
10
  # the development environment for this app. For example, this is typically used
9
11
  # to load some additional test classes to use your plugin APIs so that they can
10
12
  # be tested and/or interacted with in the console.
11
- require "test_ids"
13
+ require 'test_ids'
12
14
 
13
15
  module TestIdsDev
14
16
  # Example of how to explicitly require a file
15
17
  # require "test_ids_dev/my_file"
16
-
18
+
17
19
  # Load all files in the lib/test_ids_dev directory.
18
20
  # Note that there is no problem from requiring a file twice (Ruby will ignore
19
21
  # the second require), so if you have a file that must be required first, then
data/config/commands.rb CHANGED
@@ -1,9 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file should be used to extend the origen with application specific commands
2
4
 
3
- # Map any command aliases here, for example to allow 'origen ex' to refer to a
4
- # command called execute you would add a reference as shown below:
5
- aliases ={
6
- # "ex" => "execute",
5
+ # Map any command aliases here, for example to allow 'origen ex' to refer to a
6
+ # command called execute you would add a reference as shown below:
7
+ aliases = {
8
+ # "ex" => "execute",
7
9
  }
8
10
 
9
11
  # The requested command is passed in here as @command, this checks it against
@@ -13,33 +15,33 @@ aliases ={
13
15
  # Now branch to the specific task code
14
16
  case @command
15
17
 
16
- when "tags"
18
+ when 'tags'
17
19
  Dir.chdir Origen.root do
18
- system("ripper-tags -R")
20
+ system('ripper-tags -R')
19
21
  end
20
22
  exit 0
21
23
 
22
24
  # Example of how to make a command to run unit tests, this simply invokes RSpec on
23
25
  # the spec directory
24
- when "specs"
25
- require "rspec"
26
+ when 'specs'
27
+ require 'rspec'
26
28
  exit RSpec::Core::Runner.run(['spec'])
27
29
 
28
30
  # Example of how to make a command to run diff-based tests
29
- when "examples", "test"
31
+ when 'examples', 'test'
30
32
  Origen.load_application
31
33
  status = 0
32
34
 
33
35
  # Program generator integration test
34
- ARGV = %w(program/prb1.rb -t default -e default -r approved)
36
+ ARGV = %w[program/prb1.rb -t default -e default -r approved]
35
37
  load "#{Origen.top}/lib/origen/commands/program.rb"
36
- ARGV = %W(program/prb1.rb -t dut2 -o #{Origen.root}/output/dut2 -e default -r approved/dut2)
38
+ ARGV = %W[program/prb1.rb -t dut2 -o #{Origen.root}/output/dut2 -e default -r approved/dut2]
37
39
  load "#{Origen.top}/lib/origen/commands/program.rb"
38
40
 
39
- if Origen.app.stats.changed_files == 0 &&
40
- Origen.app.stats.new_files == 0 &&
41
- Origen.app.stats.changed_patterns == 0 &&
42
- Origen.app.stats.new_patterns == 0
41
+ if Origen.app.stats.changed_files.zero? &&
42
+ Origen.app.stats.new_files.zero? &&
43
+ Origen.app.stats.changed_patterns.zero? &&
44
+ Origen.app.stats.new_patterns.zero?
43
45
 
44
46
  Origen.app.stats.report_pass
45
47
  else
@@ -47,13 +49,13 @@ when "examples", "test"
47
49
  status = 1
48
50
  end
49
51
  puts
50
- if @command == "test"
52
+ if @command == 'test'
51
53
  Origen.app.unload_target!
52
- require "rspec"
54
+ require 'rspec'
53
55
  result = RSpec::Core::Runner.run(['spec'])
54
56
  status = status == 1 ? 1 : result
55
57
  end
56
- exit status # Exit with a 1 on the event of a failure per std unix result codes
58
+ exit status # Exit with a 1 on the event of a failure per std unix result codes
57
59
 
58
60
  # Always leave an else clause to allow control to fall back through to the
59
61
  # Origen command handler.
@@ -68,4 +70,4 @@ else
68
70
  test Run both specs and examples, -c will enable coverage
69
71
  EOT
70
72
 
71
- end
73
+ end
@@ -1,16 +1,18 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # The requested command is passed in here as @command
2
4
  case @command
3
5
 
4
- when "test_ids:rollback"
6
+ when 'test_ids:rollback'
5
7
  if ARGV[0]
6
8
  local = TestIds::Git.path_to_local
7
9
  TestIds::Git.new(local: local).rollback(ARGV[0])
8
10
  else
9
- puts "You must supply a commit ID to rollback to, e.g. origen test_ids:rollback 456ac3f53"
11
+ puts 'You must supply a commit ID to rollback to, e.g. origen test_ids:rollback 456ac3f53'
10
12
  end
11
13
  exit 0
12
14
 
13
- when "test_ids:clear", "test_ids:repair"
15
+ when 'test_ids:clear', 'test_ids:repair'
14
16
  require "test_ids/commands/#{@command.split(':').last}"
15
17
  exit 0
16
18
 
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module TestIds
2
2
  MAJOR = 1
3
3
  MINOR = 2
4
- BUGFIX = 3
4
+ BUGFIX = 4
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
7
7
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # You can define any Rake tasks to support your application here (or in any file
2
3
  # ending in .rake in this directory).
3
4
  #