Skip to content

Commit

Permalink
Merge pull request #2624 from shubhamshinde360/FACT-3438
Browse files Browse the repository at this point in the history
(FACT-3438) Handle os.architecture fact for debian aarch64
  • Loading branch information
shubhamshinde360 authored Oct 18, 2023
2 parents 8c441ac + 4c8aa54 commit cb9a7c2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion acceptance/lib/facter/acceptance/base_fact_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,15 @@ def debian_expected_facts(agent)
if agent['platform'] =~ /amd64/
os_arch = 'amd64'
os_hardware = 'x86_64'
processor_model_pattern = /(Intel\(R\).*)|(AMD.*)/
elsif agent['platform'] =~ /aarch64/
os_arch = 'aarch64'
os_hardware = 'aarch64'
processor_model_pattern = // # FACT-3439 - facter doesn't figure out the processor type on these machines
else
os_arch = 'i386'
os_hardware = 'i686'
processor_model_pattern = /(Intel\(R\).*)|(AMD.*)/
end

expected_facts = {
Expand All @@ -101,7 +107,7 @@ def debian_expected_facts(agent)
'processors.count' => /[1-9]/,
'processors.physicalcount' => /[1-9]/,
'processors.isa' => /unknown|#{os_hardware}/,
'processors.models' => /(Intel\(R\).*)|(AMD.*)/,
'processors.models' => processor_model_pattern,
'kernel' => 'Linux',
'kernelrelease' => /\d+\.\d+\.\d+/,
'kernelversion' => /\d+\.\d+/,
Expand Down

0 comments on commit cb9a7c2

Please sign in to comment.