origen 0.60.1 → 0.60.5
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 +4 -4
- data/config/version.rb +1 -1
- data/lib/origen/application/lsf_manager.rb +30 -10
- data/lib/origen/application/runner.rb +33 -23
- data/lib/origen/client.rb +23 -12
- data/origen_app_generators/origen_app_generators.gemspec +1 -1
- data/origen_site_config.yml +7 -5
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: db57b94cabfd9e14047a2922c410b920da75fd4bb9a66ba8bba6bb972cb4b125
         | 
| 4 | 
            +
              data.tar.gz: ad5be66cb94c42632a2d801b463ffb2984fd4fa9cdaffb5104d9bc3707bf53d4
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: a9df386c2629ca963ddb93b0c65d6eb0a6281bc394a0c5f5bf17a0c8c3502b4d184c45fdc97ab6f3f2b1ade1fd3141aa8725dcda06a68549954dcdbe9f5799e2
         | 
| 7 | 
            +
              data.tar.gz: 855228da5608fb39726acfe33e56e00ac46f5d2a5c557bb6f1c840cfc912a2bd1ae1627e19ac37f3cee67bac31d82acd177a0d9d774eb6440cbed76cfd7bb86e
         | 
    
        data/config/version.rb
    CHANGED
    
    
| @@ -253,6 +253,16 @@ module Origen | |
| 253 253 |  | 
| 254 254 | 
             
                  # Build the log file from the completed jobs
         | 
| 255 255 | 
             
                  def build_log(options = {})
         | 
| 256 | 
            +
                    @completed_patterns = 0
         | 
| 257 | 
            +
                    @total_vectors = 0
         | 
| 258 | 
            +
                    @total_duration = 0
         | 
| 259 | 
            +
                    @completed_files = 0
         | 
| 260 | 
            +
                    @changed_patterns = 0
         | 
| 261 | 
            +
                    @changed_files = 0
         | 
| 262 | 
            +
                    @new_patterns = 0
         | 
| 263 | 
            +
                    @new_files = 0
         | 
| 264 | 
            +
                    @failed_patterns = 0
         | 
| 265 | 
            +
                    @failed_files = 0
         | 
| 256 266 | 
             
                    log_method = options[:log_file] ? options[:log_file] : :info
         | 
| 257 267 | 
             
                    Origen.log.send(log_method, '*' * 70)
         | 
| 258 268 | 
             
                    completed_jobs.each do |job|
         | 
| @@ -271,25 +281,25 @@ module Origen | |
| 271 281 | 
             
                          begin
         | 
| 272 282 | 
             
                            line.gsub!(/\e\[\d+m/, '')  # Remove any coloring
         | 
| 273 283 | 
             
                            if line =~ /Total patterns:\s+(\d+)/
         | 
| 274 | 
            -
                               | 
| 284 | 
            +
                              @completed_patterns = Regexp.last_match[1].to_i
         | 
| 275 285 | 
             
                            elsif line =~ /Total vectors:\s+(\d+)/
         | 
| 276 | 
            -
                               | 
| 286 | 
            +
                              @total_vectors = Regexp.last_match[1].to_i
         | 
| 277 287 | 
             
                            elsif line =~ /Total duration:\s+(\d+\.\d+)/
         | 
| 278 | 
            -
                               | 
| 288 | 
            +
                              @total_duration = Regexp.last_match[1].to_f
         | 
| 279 289 | 
             
                            elsif line =~ /Total files:\s+(\d+)/
         | 
| 280 | 
            -
                               | 
| 290 | 
            +
                              @completed_files = Regexp.last_match[1].to_i
         | 
| 281 291 | 
             
                            elsif line =~ /Changed patterns:\s+(\d+)/
         | 
| 282 | 
            -
                               | 
| 292 | 
            +
                              @changed_patterns = Regexp.last_match[1].to_i
         | 
| 283 293 | 
             
                            elsif line =~ /Changed files:\s+(\d+)/
         | 
| 284 | 
            -
                               | 
| 294 | 
            +
                              @changed_files = Regexp.last_match[1].to_i
         | 
| 285 295 | 
             
                            elsif line =~ /New patterns:\s+(\d+)/
         | 
| 286 | 
            -
                               | 
| 296 | 
            +
                              @new_patterns = Regexp.last_match[1].to_i
         | 
| 287 297 | 
             
                            elsif line =~ /New files:\s+(\d+)/
         | 
| 288 | 
            -
                               | 
| 298 | 
            +
                              @new_files = Regexp.last_match[1].to_i
         | 
| 289 299 | 
             
                            elsif line =~ /FAILED patterns:\s+(\d+)/
         | 
| 290 | 
            -
                               | 
| 300 | 
            +
                              @failed_patterns = Regexp.last_match[1].to_i
         | 
| 291 301 | 
             
                            elsif line =~ /FAILED files:\s+(\d+)/
         | 
| 292 | 
            -
                               | 
| 302 | 
            +
                              @failed_files = Regexp.last_match[1].to_i
         | 
| 293 303 | 
             
                            elsif line =~ /ERROR!/
         | 
| 294 304 | 
             
                              stats.errors += 1
         | 
| 295 305 | 
             
                              Origen.log.send :relog, line, options
         | 
| @@ -318,6 +328,16 @@ module Origen | |
| 318 328 | 
             
                          end
         | 
| 319 329 | 
             
                        end
         | 
| 320 330 | 
             
                      end
         | 
| 331 | 
            +
                      stats.completed_patterns += @completed_patterns
         | 
| 332 | 
            +
                      stats.total_vectors += @total_vectors
         | 
| 333 | 
            +
                      stats.total_duration += @total_duration
         | 
| 334 | 
            +
                      stats.completed_files += @completed_files
         | 
| 335 | 
            +
                      stats.changed_patterns += @changed_patterns
         | 
| 336 | 
            +
                      stats.changed_files += @changed_files
         | 
| 337 | 
            +
                      stats.new_patterns += @new_patterns
         | 
| 338 | 
            +
                      stats.new_files += @new_files
         | 
| 339 | 
            +
                      stats.failed_patterns += @failed_patterns
         | 
| 340 | 
            +
                      stats.failed_files += @failed_files
         | 
| 321 341 | 
             
                    end
         | 
| 322 342 | 
             
                    Origen.log.send(log_method, '*' * 70)
         | 
| 323 343 | 
             
                    stats.print_summary
         | 
| @@ -134,30 +134,40 @@ module Origen | |
| 134 134 | 
             
                  #
         | 
| 135 135 | 
             
                  # @api private
         | 
| 136 136 | 
             
                  def record_invocation(options)
         | 
| 137 | 
            -
                     | 
| 138 | 
            -
             | 
| 139 | 
            -
             | 
| 140 | 
            -
             | 
| 141 | 
            -
             | 
| 142 | 
            -
             | 
| 143 | 
            -
             | 
| 144 | 
            -
             | 
| 145 | 
            -
             | 
| 146 | 
            -
             | 
| 147 | 
            -
             | 
| 148 | 
            -
             | 
| 137 | 
            +
                    if Origen.site_config.record_invocation == true
         | 
| 138 | 
            +
                      record_invocation = false
         | 
| 139 | 
            +
                      begin
         | 
| 140 | 
            +
                        # Only record user invocations at this time, also bypass windows since it seems
         | 
| 141 | 
            +
                        # that threads can't be trusted not to block
         | 
| 142 | 
            +
                        unless Origen.running_remotely? # || Origen.running_on_windows?
         | 
| 143 | 
            +
                          # rubocop:disable Style/RescueModifier
         | 
| 144 | 
            +
                          record_invocation = Thread.new do
         | 
| 145 | 
            +
                            Origen.client.record_invocation(options[:action]) if options[:action]
         | 
| 146 | 
            +
                            rescue
         | 
| 147 | 
            +
                            # Dont allow server being down to flood the screen with the stacktrace
         | 
| 148 | 
            +
                          end
         | 
| 149 | 
            +
                          # rubocop:enable Style/RescueModifier
         | 
| 150 | 
            +
                        end
         | 
| 151 | 
            +
                       rescue
         | 
| 152 | 
            +
                        # Don't allow this to kill an origen command
         | 
| 153 | 
            +
                      end
         | 
| 154 | 
            +
                    end
         | 
| 155 | 
            +
                    # yield here is really important for the callback tests!!
         | 
| 149 156 | 
             
                    yield
         | 
| 150 | 
            -
             | 
| 151 | 
            -
                     | 
| 152 | 
            -
             | 
| 153 | 
            -
             | 
| 154 | 
            -
             | 
| 155 | 
            -
             | 
| 156 | 
            -
             | 
| 157 | 
            -
             | 
| 158 | 
            -
             | 
| 159 | 
            -
             | 
| 160 | 
            -
             | 
| 157 | 
            +
             | 
| 158 | 
            +
                    if Origen.site_config.record_invocation == true
         | 
| 159 | 
            +
                      begin
         | 
| 160 | 
            +
                        unless Origen.running_remotely?
         | 
| 161 | 
            +
                          # Wait for a server response, ideally would like to not wait here, but it seems if not
         | 
| 162 | 
            +
                          # then invocation postings can be dropped, especially on windows
         | 
| 163 | 
            +
                          Origen.profile 'waiting for recording invocation' do
         | 
| 164 | 
            +
                            record_invocation.value
         | 
| 165 | 
            +
                          end
         | 
| 166 | 
            +
                        end
         | 
| 167 | 
            +
                       rescue
         | 
| 168 | 
            +
                        # Don't allow this to kill an origen command
         | 
| 169 | 
            +
                      end
         | 
| 170 | 
            +
                    end
         | 
| 161 171 | 
             
                  end
         | 
| 162 172 |  | 
| 163 173 | 
             
                  # The action to take should be set by the action option, but legacy code will pass
         | 
    
        data/lib/origen/client.rb
    CHANGED
    
    | @@ -5,15 +5,17 @@ module Origen | |
| 5 5 | 
             
                #   https://github.com/jnunemaker/httparty/tree/v0.9.0
         | 
| 6 6 |  | 
| 7 7 | 
             
                require 'json'
         | 
| 8 | 
            -
                require ' | 
| 9 | 
            -
                include HTTParty
         | 
| 8 | 
            +
                require 'net/http'
         | 
| 9 | 
            +
                # include HTTParty
         | 
| 10 10 |  | 
| 11 11 | 
             
                USE_DEV_SERVER = false
         | 
| 12 12 | 
             
                DEV_PORT = 3000
         | 
| 13 13 |  | 
| 14 14 | 
             
                def post(path, options = {})
         | 
| 15 15 | 
             
                  options[:port] = port
         | 
| 16 | 
            -
                   | 
| 16 | 
            +
                  invocation_url = URI.parse("#{url}/#{path}")
         | 
| 17 | 
            +
                  http = Net::HTTP.new(invocation_url.host, invocation_url.port)
         | 
| 18 | 
            +
                  http.post(invocation_url, JSON.dump(options[:body]), 'Content-type' => 'application/vnd.api+json', 'Accept' => 'text/json, application/vnd.api+json')
         | 
| 17 19 | 
             
                end
         | 
| 18 20 |  | 
| 19 21 | 
             
                def get(path, options = {})
         | 
| @@ -21,7 +23,11 @@ module Origen | |
| 21 23 | 
             
                end
         | 
| 22 24 |  | 
| 23 25 | 
             
                def url
         | 
| 24 | 
            -
                   | 
| 26 | 
            +
                  if Origen.site_config.invocation_url.nil?
         | 
| 27 | 
            +
                    'http://localhost:3000'
         | 
| 28 | 
            +
                  else
         | 
| 29 | 
            +
                    Origen.site_config.invocation_url
         | 
| 30 | 
            +
                  end
         | 
| 25 31 | 
             
                end
         | 
| 26 32 |  | 
| 27 33 | 
             
                def port
         | 
| @@ -29,15 +35,20 @@ module Origen | |
| 29 35 | 
             
                end
         | 
| 30 36 |  | 
| 31 37 | 
             
                def record_invocation(command)
         | 
| 32 | 
            -
                   | 
| 33 | 
            -
                     | 
| 34 | 
            -
             | 
| 35 | 
            -
             | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 38 | 
            +
                  content = {
         | 
| 39 | 
            +
                    data: {
         | 
| 40 | 
            +
                      type:       'applications',
         | 
| 41 | 
            +
                      attributes: {
         | 
| 42 | 
            +
                        user:             Origen.current_user.core_id,
         | 
| 43 | 
            +
                        application:      Origen.app.config.initials,
         | 
| 44 | 
            +
                        "app-version":    Origen.app.version,
         | 
| 45 | 
            +
                        "origen-version": Origen.version,
         | 
| 46 | 
            +
                        command:          command,
         | 
| 47 | 
            +
                        platform:         Origen.running_on_windows? ? 'windows' : 'linux'
         | 
| 48 | 
            +
                      }
         | 
| 49 | 
            +
                    }
         | 
| 39 50 | 
             
                  }
         | 
| 40 | 
            -
                  post(' | 
| 51 | 
            +
                  post('applications', body: content)
         | 
| 41 52 | 
             
                end
         | 
| 42 53 |  | 
| 43 54 | 
             
                # Returns an array of data packets for all plugins
         | 
| @@ -8,7 +8,7 @@ Gem::Specification.new do |s| | |
| 8 8 | 
             
              s.required_rubygems_version = Gem::Requirement.new(">= 1.8.11".freeze) if s.respond_to? :required_rubygems_version=
         | 
| 9 9 | 
             
              s.require_paths = ["lib".freeze]
         | 
| 10 10 | 
             
              s.authors = ["Stephen McGinty".freeze]
         | 
| 11 | 
            -
              s.date = "2021- | 
| 11 | 
            +
              s.date = "2021-08-10"
         | 
| 12 12 | 
             
              s.email = ["stephen.f.mcginty@gmail.com".freeze]
         | 
| 13 13 | 
             
              s.files = ["bin/boot.rb".freeze, "config/application.rb".freeze, "config/boot.rb".freeze, "config/commands.rb".freeze, "config/shared_commands.rb".freeze, "config/version.rb".freeze, "lib/origen_app_generators.rb".freeze, "lib/origen_app_generators/application.rb".freeze, "lib/origen_app_generators/base.rb".freeze, "lib/origen_app_generators/empty_application.rb".freeze, "lib/origen_app_generators/empty_plugin.rb".freeze, "lib/origen_app_generators/new.rb".freeze, "lib/origen_app_generators/new_app_tests.rb".freeze, "lib/origen_app_generators/origen_infrastructure/app_generator_plugin.rb".freeze, "lib/origen_app_generators/plugin.rb".freeze, "lib/origen_app_generators/test_engineering/common.rb".freeze, "lib/origen_app_generators/test_engineering/stand_alone_application.rb".freeze, "lib/origen_app_generators/test_engineering/test_block.rb".freeze, "templates/app_generators".freeze, "templates/app_generators/application".freeze, "templates/app_generators/application/.gitignore".freeze, "templates/app_generators/application/.irbrc".freeze, "templates/app_generators/application/.rspec".freeze, "templates/app_generators/application/.travis.yml".freeze, "templates/app_generators/application/Gemfile".freeze, "templates/app_generators/application/Rakefile".freeze, "templates/app_generators/application/app".freeze, "templates/app_generators/application/app/blocks".freeze, "templates/app_generators/application/app/blocks/top_level.rb".freeze, "templates/app_generators/application/app/lib".freeze, "templates/app_generators/application/app/lib/module.rb".freeze, "templates/app_generators/application/app/templates".freeze, "templates/app_generators/application/app/templates/web".freeze, "templates/app_generators/application/app/templates/web/index.md.erb".freeze, "templates/app_generators/application/app/templates/web/layouts".freeze, "templates/app_generators/application/app/templates/web/layouts/_basic.html.erb".freeze, "templates/app_generators/application/app/templates/web/partials".freeze, "templates/app_generators/application/app/templates/web/partials/_navbar.html.erb".freeze, "templates/app_generators/application/app/templates/web/release_notes.md.erb".freeze, "templates/app_generators/application/config".freeze, "templates/app_generators/application/config/application.rb".freeze, "templates/app_generators/application/config/boot.rb".freeze, "templates/app_generators/application/config/commands.rb".freeze, "templates/app_generators/application/config/maillist_dev.txt".freeze, "templates/app_generators/application/config/maillist_prod.txt".freeze, "templates/app_generators/application/config/version.rb".freeze, "templates/app_generators/application/doc".freeze, "templates/app_generators/application/doc/history".freeze, "templates/app_generators/application/dot_keep".freeze, "templates/app_generators/application/origen_core_session".freeze, "templates/app_generators/application/spec".freeze, "templates/app_generators/application/spec/spec_helper.rb".freeze, "templates/app_generators/application/target".freeze, "templates/app_generators/application/target/debug.rb".freeze, "templates/app_generators/application/target/default.rb".freeze, "templates/app_generators/application/target/production.rb".freeze, "templates/app_generators/new".freeze, "templates/app_generators/new/generator.rb".freeze, "templates/app_generators/new/info.md.erb".freeze, "templates/app_generators/origen_infrastructure".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/application.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/base.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/module.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/plugin.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/config".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/config/load_generators.rb".freeze, "templates/app_generators/plugin".freeze, "templates/app_generators/plugin/Gemfile".freeze, "templates/app_generators/plugin/Rakefile".freeze, "templates/app_generators/plugin/app".freeze, "templates/app_generators/plugin/app/templates".freeze, "templates/app_generators/plugin/app/templates/web".freeze, "templates/app_generators/plugin/app/templates/web/index.md.erb".freeze, "templates/app_generators/plugin/app/templates/web/partials".freeze, "templates/app_generators/plugin/app/templates/web/partials/_navbar_external.html.erb".freeze, "templates/app_generators/plugin/app/templates/web/partials/_navbar_internal.html.erb".freeze, "templates/app_generators/plugin/config".freeze, "templates/app_generators/plugin/config/boot.rb".freeze, "templates/app_generators/plugin/gemspec.rb".freeze, "templates/app_generators/test_engineering".freeze, "templates/app_generators/test_engineering/environment".freeze, "templates/app_generators/test_engineering/environment/j750.rb".freeze, "templates/app_generators/test_engineering/environment/uflex.rb".freeze, "templates/app_generators/test_engineering/environment/v93k.rb".freeze, "templates/app_generators/test_engineering/stand_alone_application".freeze, "templates/app_generators/test_engineering/stand_alone_application/.keep".freeze, "templates/app_generators/test_engineering/test_block".freeze, "templates/app_generators/test_engineering/test_block/.keep".freeze]
         | 
| 14 14 | 
             
              s.homepage = "http://origen-sdk.org/origen_app_generators".freeze
         | 
    
        data/origen_site_config.yml
    CHANGED
    
    | @@ -146,9 +146,11 @@ gem_use_from_system: | |
| 146 146 | 
             
            #ldap_user_id_attribute: uid
         | 
| 147 147 |  | 
| 148 148 | 
             
            # LSF Configuration
         | 
| 149 | 
            -
            lsf_queue: 'batchq'
         | 
| 150 | 
            -
            lsf_group: 'nil'
         | 
| 151 | 
            -
            lsf_project: 'msg.te'
         | 
| 152 | 
            -
            lsf_resource: 'rhel6'
         | 
| 153 | 
            -
            lsf_cores: '1'
         | 
| 149 | 
            +
            # lsf_queue: 'batchq'
         | 
| 150 | 
            +
            # lsf_group: 'nil'
         | 
| 151 | 
            +
            # lsf_project: 'msg.te'
         | 
| 152 | 
            +
            # lsf_resource: 'rhel6'
         | 
| 153 | 
            +
            # lsf_cores: '1'
         | 
| 154 | 
            +
             | 
| 155 | 
            +
            # lsf_debug is needed for spec tests on the core.
         | 
| 154 156 | 
             
            lsf_debug: 'false'
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: origen
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.60. | 
| 4 | 
            +
              version: 0.60.5
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Stephen McGinty
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2021- | 
| 11 | 
            +
            date: 2021-11-19 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: activesupport
         | 
| @@ -749,7 +749,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 749 749 | 
             
                - !ruby/object:Gem::Version
         | 
| 750 750 | 
             
                  version: 1.8.11
         | 
| 751 751 | 
             
            requirements: []
         | 
| 752 | 
            -
            rubygems_version: 3. | 
| 752 | 
            +
            rubygems_version: 3.2.31
         | 
| 753 753 | 
             
            signing_key: 
         | 
| 754 754 | 
             
            specification_version: 4
         | 
| 755 755 | 
             
            summary: The Semiconductor Developer's Kit
         |