Skip to content

Commit

Permalink
Merge pull request #1341 from BallAerospace/sort_crc_files
Browse files Browse the repository at this point in the history
Sort when generating crc.txt
  • Loading branch information
ryanmelt authored Sep 11, 2021
2 parents 28cfaab + 745088c commit 8a1acb1
Show file tree
Hide file tree
Showing 8 changed files with 822 additions and 802 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ task :version => [:require_version] do
# Create the crc.txt file
crc = RakeCrc32.new
File.open("data/crc.txt",'w') do |file|
Dir[File.join('lib','**','*.rb')].each do |filename|
Dir[File.join('lib','**','*.rb')].sort.each do |filename|
file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
file.puts "\"#{filename}\" #{sprintf("0x%08X", crc.calc(file_data))}"
end
Expand Down
804 changes: 402 additions & 402 deletions data/crc.txt

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions demo/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,29 @@ def create_crc_file(official)
crc = Cosmos::Crc32.new(Cosmos::Crc32::DEFAULT_POLY, Cosmos::Crc32::DEFAULT_SEED, true, false)
File.open("config/data/crc.txt",'w') do |file|
file.puts "USER_MODIFIED" unless official
Dir[File.join('lib','**','*')].each do |filename|
Dir[File.join('lib','**','*')].sort.each do |filename|
next if File.directory?(filename)
next if ignore.include?(filename)
file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
file.puts "\"#{filename}\" #{sprintf("0x%08X", crc.calc(file_data))}"
count += 1
end
Dir[File.join('config','**','*')].each do |filename|
Dir[File.join('config','**','*')].sort.each do |filename|
next if File.directory?(filename)
next if ignore.include?(filename)
next if File.basename(filename) == 'crc.txt'
file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
file.puts "\"#{filename}\" #{sprintf("0x%08X", crc.calc(file_data))}"
count += 1
end
Dir[File.join('tools','**','*')].each do |filename|
Dir[File.join('tools','**','*')].sort.each do |filename|
next if File.directory?(filename)
next if ignore.include?(filename)
file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
file.puts "\"#{filename}\" #{sprintf("0x%08X", crc.calc(file_data))}"
count += 1
end
Dir[File.join('procedures','**','*')].each do |filename|
Dir[File.join('procedures','**','*')].sort.each do |filename|
next if File.directory?(filename)
next if ignore.include?(filename)
file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
Expand Down
421 changes: 211 additions & 210 deletions demo/config/data/crc.txt

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions install/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,29 @@ def create_crc_file(official)
crc = Cosmos::Crc32.new(Cosmos::Crc32::DEFAULT_POLY, Cosmos::Crc32::DEFAULT_SEED, true, false)
File.open("config/data/crc.txt",'w') do |file|
file.puts "USER_MODIFIED" unless official
Dir[File.join('lib','**','*')].each do |filename|
Dir[File.join('lib','**','*')].sort.each do |filename|
next if File.directory?(filename)
next if ignore.include?(filename)
file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
file.puts "\"#{filename}\" #{sprintf("0x%08X", crc.calc(file_data))}"
count += 1
end
Dir[File.join('config','**','*')].each do |filename|
Dir[File.join('config','**','*')].sort.each do |filename|
next if File.directory?(filename)
next if ignore.include?(filename)
next if File.basename(filename) == 'crc.txt'
file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
file.puts "\"#{filename}\" #{sprintf("0x%08X", crc.calc(file_data))}"
count += 1
end
Dir[File.join('tools','**','*')].each do |filename|
Dir[File.join('tools','**','*')].sort.each do |filename|
next if File.directory?(filename)
next if ignore.include?(filename)
file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
file.puts "\"#{filename}\" #{sprintf("0x%08X", crc.calc(file_data))}"
count += 1
end
Dir[File.join('procedures','**','*')].each do |filename|
Dir[File.join('procedures','**','*')].sort.each do |filename|
next if File.directory?(filename)
next if ignore.include?(filename)
file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
Expand Down
258 changes: 129 additions & 129 deletions install/config/data/crc.txt

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions test/performance/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,29 @@ def create_crc_file(official)
crc = Cosmos::Crc32.new(Cosmos::Crc32::DEFAULT_POLY, Cosmos::Crc32::DEFAULT_SEED, true, false)
File.open("config/data/crc.txt",'w') do |file|
file.puts "USER_MODIFIED" unless official
Dir[File.join('lib','**','*')].each do |filename|
Dir[File.join('lib','**','*')].sort.each do |filename|
next if File.directory?(filename)
next if ignore.include?(filename)
file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
file.puts "\"#{filename}\" #{sprintf("0x%08X", crc.calc(file_data))}"
count += 1
end
Dir[File.join('config','**','*')].each do |filename|
Dir[File.join('config','**','*')].sort.each do |filename|
next if File.directory?(filename)
next if ignore.include?(filename)
next if File.basename(filename) == 'crc.txt'
file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
file.puts "\"#{filename}\" #{sprintf("0x%08X", crc.calc(file_data))}"
count += 1
end
Dir[File.join('tools','**','*')].each do |filename|
Dir[File.join('tools','**','*')].sort.each do |filename|
next if File.directory?(filename)
next if ignore.include?(filename)
file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
file.puts "\"#{filename}\" #{sprintf("0x%08X", crc.calc(file_data))}"
count += 1
end
Dir[File.join('procedures','**','*')].each do |filename|
Dir[File.join('procedures','**','*')].sort.each do |filename|
next if File.directory?(filename)
next if ignore.include?(filename)
file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
Expand Down
115 changes: 67 additions & 48 deletions test/performance/config/data/crc.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"lib/packet_target.rb" 0x59C31C58
"lib/thread_target.rb" 0x09C820AD
"lib/thread_target.rb" 0x6A2E93AF
"lib/user_version.rb" 0x8F282EE9
"config/data/attitude.bin" 0xB6D17289
"config/data/diamond.STL" 0xA96E4846
"config/data/groundoff.gif" 0x7BA45A4D
Expand All @@ -16,31 +17,48 @@
"config/data/tada.wav" 0x1ABCFFD1
"config/data/vswitchoff.gif" 0xFAE436C9
"config/data/vswitchon.gif" 0xD747AC45
"config/system/system_packets.txt" 0xDA665B50
"config/system/system_threads.txt" 0x20F6E744
"config/system/system.txt" 0x00000000
"config/system/system_packets.txt" 0xD7719176
"config/system/system_threads.txt" 0x345E358A
"config/targets/COSMOS/cmd_tlm/cosmos_server_cmds.txt" 0x9589CE1D
"config/targets/COSMOS/cmd_tlm/cosmos_server_tlm.txt" 0xC667CCD6
"config/targets/COSMOS/cmd_tlm_server.txt" 0xE53A4164
"config/targets/COSMOS/screens/limits_change.txt" 0xE8C47C54
"config/targets/COSMOS/screens/version.txt" 0x393D4F72
"config/targets/COSMOS/target.txt" 0xB39D9281
"config/targets/PACKET/cmd_tlm/packet_cmds.txt" 0xAF042065
"config/targets/PACKET/cmd_tlm/packet_tlm.txt" 0x03795B48
"config/targets/PACKET/cmd_tlm/packet_tlm.txt" 0x2FCD6766
"config/targets/PACKET/cmd_tlm_server.txt" 0x7C18BA09
"config/targets/PACKET/lib/packet_interface.rb" 0x0BC1909F
"config/targets/PACKET/lib/packet_limits_response.rb" 0xA427D78E
"config/targets/PACKET/screens/status.txt" 0xD9B1DD08
"config/targets/PACKET/target.txt" 0x0B0338E4
"config/targets/SYSTEM/screens/status.txt" 0x89B616E5
"config/targets/THREAD/cmd_tlm/thread_cmds.txt" 0x8D82A34C
"config/targets/THREAD/cmd_tlm/thread_tlm.txt" 0xAF01DDA9
"config/targets/THREAD/cmd_tlm_server.txt" 0x37AE20AF
"config/targets/THREAD/cmd_tlm/thread_cmds.txt" 0xE0E86176
"config/targets/THREAD/cmd_tlm/thread_tlm.txt" 0xA9255BD2
"config/targets/THREAD/cmd_tlm_server.txt" 0xA2C09F15
"config/targets/THREAD/lib/thread_interface.rb" 0x82FB49D8
"config/targets/THREAD/screens/status.txt" 0xD9B1DD08
"config/targets/THREAD/target.txt" 0x4ED5B5BC
"config/tools/cmd_tlm_server/cmd_tlm_server_packets.txt" 0x35E7315D
"config/tools/cmd_tlm_server/cmd_tlm_server_threads.txt" 0xBDC1510D
"config/tools/cmd_tlm_server/cmd_tlm_server_threads.txt" 0x7781DEEA
"config/tools/data_viewer/data_viewer.txt" 0xCAC3B017
"config/tools/handbook_creator/assets/css/bootstrap-theme.css" 0x446F3211
"config/tools/handbook_creator/assets/css/bootstrap-theme.min.css" 0xB49F966D
"config/tools/handbook_creator/assets/css/bootstrap.css" 0x3F240B56
"config/tools/handbook_creator/assets/css/bootstrap.min.css" 0x1BD3585F
"config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.eot" 0x50687BA4
"config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.svg" 0x068A502C
"config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.ttf" 0x063128D6
"config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.woff" 0x946BFB8C
"config/tools/handbook_creator/assets/img/ball_logo.bmp" 0xAD799C2E
"config/tools/handbook_creator/assets/img/ball_logo.gif" 0xD8A3D76B
"config/tools/handbook_creator/assets/img/ball_logo.jpg" 0xA15FB300
"config/tools/handbook_creator/assets/js/bootstrap.js" 0x013B0300
"config/tools/handbook_creator/assets/js/bootstrap.min.js" 0xB3ECDABF
"config/tools/handbook_creator/assets/js/html5shiv.js" 0x15B5CD4D
"config/tools/handbook_creator/assets/js/jquery-1.10.2.min.js" 0xCDB86103
"config/tools/handbook_creator/assets/js/respond.min.js" 0xD9168C21
"config/tools/handbook_creator/default_toc.xsl" 0x4122A040
"config/tools/handbook_creator/handbook_creator.txt" 0xAA806C94
"config/tools/handbook_creator/templates/command_packets.html.erb" 0x9897CA7A
Expand All @@ -57,7 +75,7 @@
"config/tools/handbook_creator/templates/telemetry_toc.html.erb" 0x610E3BC5
"config/tools/handbook_creator/templates/title.html.erb" 0xBC66E2BC
"config/tools/launcher/launcher_packets.txt" 0x51DC78DA
"config/tools/launcher/launcher_threads.txt" 0x878061C0
"config/tools/launcher/launcher_threads.txt" 0x5C3A58EF
"config/tools/limits_monitor/README.txt" 0x93B2C07E
"config/tools/opengl_builder/README.txt" 0x93B2C07E
"config/tools/script_runner/script_runner.txt" 0x1EECD803
Expand All @@ -67,7 +85,7 @@
"config/tools/table_manager/MCConfigurationTable_fsw2_def.txt" 0x9DE18AEA
"config/tools/table_manager/PPSSelectionTable_def.txt" 0xE7A1E70B
"config/tools/table_manager/TLMMonitoringTable_def.txt" 0x70DABA45
"config/tools/test_runner/test_runner.txt" 0x1EB7E49C
"config/tools/test_runner/test_runner.txt" 0x6401DC8C
"config/tools/tlm_extractor/tlm_extractor.txt" 0x51B791DF
"config/tools/tlm_extractor/tlm_extractor2.txt" 0x210DED6A
"config/tools/tlm_extractor/tlm_extractor3.txt" 0x3A25E012
Expand All @@ -85,14 +103,41 @@
"tools/CmdTlmServerMemProf.bat" 0xF1C468BA
"tools/DataViewer" 0x2F81335B
"tools/DataViewer.bat" 0xF1C468BA
"tools/ExampleTarget" 0xC7698E38
"tools/ExampleTarget.bat" 0xF7D93DD0
"tools/HandbookCreator" 0x7337665F
"tools/HandbookCreator.bat" 0x4D5B6471
"tools/Launcher" 0xBB5DB49A
"tools/Launcher.bat" 0xF1C468BA
"tools/LimitsMonitor" 0x8227E66E
"tools/LimitsMonitor.bat" 0xF1C468BA
"tools/OpenGLBuilder" 0x70C85B16
"tools/OpenGLBuilder.bat" 0xF1C468BA
"tools/PacketTarget" 0x633EBA89
"tools/PacketTarget.bat" 0xF7D93DD0
"tools/PacketViewer" 0xCFB39857
"tools/PacketViewer.bat" 0xF1C468BA
"tools/Replay" 0x15162D45
"tools/Replay.bat" 0xF1C468BA
"tools/ScpiTarget" 0x8FB2CE09
"tools/ScpiTarget.bat" 0xF7D93DD0
"tools/ScriptRunner" 0x8DF937B6
"tools/ScriptRunner.bat" 0xF1C468BA
"tools/TableManager" 0xE75FDFFE
"tools/TableManager.bat" 0xF1C468BA
"tools/TestRunner" 0x1DBDC0CF
"tools/TestRunner.bat" 0xF1C468BA
"tools/ThreadTarget" 0x93FE9405
"tools/ThreadTarget.bat" 0xF7D93DD0
"tools/TlmExtractor" 0xE0DE48BC
"tools/TlmExtractor.bat" 0xF1C468BA
"tools/TlmGrapher" 0x8D7A0529
"tools/TlmGrapher.bat" 0xF1C468BA
"tools/TlmGrapherMemProf" 0x9A200E06
"tools/TlmGrapherMemProf.bat" 0xF1C468BA
"tools/TlmViewer" 0x120F8422
"tools/TlmViewer.bat" 0xF1C468BA
"tools/TlmViewerMemProf" 0x3CC66D92
"tools/TlmViewerMemProf.bat" 0xF1C468BA
"tools/identify_performance.rb" 0xAC543A1D
"tools/mac/CmdExtractor.app/Contents/Info.plist" 0x0E89084D
"tools/mac/CmdExtractor.app/Contents/MacOS/CmdExtractor.rb" 0x9AD128F4
"tools/mac/CmdExtractor.app/Contents/MacOS/main.sh" 0x52DD5B34
Expand Down Expand Up @@ -122,72 +167,46 @@
"tools/mac/LimitsMonitor.app/Contents/MacOS/main.sh" 0xCC934478
"tools/mac/LimitsMonitor.app/Contents/Resources/appIcon.icns" 0xC98BF799
"tools/mac/OpenGLBuilder.app/Contents/Info.plist" 0x3C2E542D
"tools/mac/OpenGLBuilder.app/Contents/MacOS/main.sh" 0x5EF4D8E2
"tools/mac/OpenGLBuilder.app/Contents/MacOS/OpenGLBuilder.rb" 0x96F7D2C2
"tools/mac/OpenGLBuilder.app/Contents/MacOS/main.sh" 0x5EF4D8E2
"tools/mac/OpenGLBuilder.app/Contents/Resources/appIcon.icns" 0x8DDBD837
"tools/mac/PacketViewer.app/Contents/Info.plist" 0x6934BF89
"tools/mac/PacketViewer.app/Contents/MacOS/main.sh" 0x0D28EF08
"tools/mac/PacketViewer.app/Contents/MacOS/PacketViewer.rb" 0x019FC483
"tools/mac/PacketViewer.app/Contents/MacOS/main.sh" 0x0D28EF08
"tools/mac/PacketViewer.app/Contents/Resources/appIcon.icns" 0xDF373DAE
"tools/mac/Replay.app/Contents/Info.plist" 0x894AC4CF
"tools/mac/Replay.app/Contents/MacOS/main.sh" 0x211D29BB
"tools/mac/Replay.app/Contents/MacOS/Replay.rb" 0xA2C90DA4
"tools/mac/Replay.app/Contents/MacOS/main.sh" 0x211D29BB
"tools/mac/Replay.app/Contents/Resources/appIcon.icns" 0x0E6B32E5
"tools/mac/ScriptRunner.app/Contents/Info.plist" 0x1BC8C5E9
"tools/mac/ScriptRunner.app/Contents/MacOS/main.sh" 0xE3274772
"tools/mac/ScriptRunner.app/Contents/MacOS/ScriptRunner.rb" 0x43D56B62
"tools/mac/ScriptRunner.app/Contents/MacOS/main.sh" 0xE3274772
"tools/mac/ScriptRunner.app/Contents/Resources/appIcon.icns" 0x9246743E
"tools/mac/TableManager.app/Contents/Info.plist" 0xF6A5877F
"tools/mac/TableManager.app/Contents/MacOS/main.sh" 0x98E69D10
"tools/mac/TableManager.app/Contents/MacOS/TableManager.rb" 0x2973832A
"tools/mac/TableManager.app/Contents/MacOS/main.sh" 0x98E69D10
"tools/mac/TableManager.app/Contents/Resources/appIcon.icns" 0xEBF5074E
"tools/mac/TestRunner.app/Contents/Info.plist" 0x482B3BA5
"tools/mac/TestRunner.app/Contents/MacOS/main.sh" 0xD486D22B
"tools/mac/TestRunner.app/Contents/MacOS/TestRunner.rb" 0xDE0A3BD7
"tools/mac/TestRunner.app/Contents/MacOS/main.sh" 0xD486D22B
"tools/mac/TestRunner.app/Contents/Resources/appIcon.icns" 0xC8D32D55
"tools/mac/TlmExtractor.app/Contents/Info.plist" 0x343784F4
"tools/mac/TlmExtractor.app/Contents/MacOS/main.sh" 0x4210EF0D
"tools/mac/TlmExtractor.app/Contents/MacOS/TlmExtractor.rb" 0x2EF21468
"tools/mac/TlmExtractor.app/Contents/MacOS/main.sh" 0x4210EF0D
"tools/mac/TlmExtractor.app/Contents/Resources/appIcon.icns" 0x0AC88876
"tools/mac/TlmGrapher.app/Contents/Info.plist" 0x3623B978
"tools/mac/TlmGrapher.app/Contents/MacOS/main.sh" 0x427E2ECF
"tools/mac/TlmGrapher.app/Contents/MacOS/TlmGrapher.rb" 0x4ECDFE31
"tools/mac/TlmGrapher.app/Contents/MacOS/main.sh" 0x427E2ECF
"tools/mac/TlmGrapher.app/Contents/Resources/appIcon.icns" 0xCA324F50
"tools/mac/TlmViewer.app/Contents/Info.plist" 0x821041E0
"tools/mac/TlmViewer.app/Contents/MacOS/main.sh" 0x99FD781B
"tools/mac/TlmViewer.app/Contents/MacOS/TlmViewer.rb" 0x922D7C22
"tools/mac/TlmViewer.app/Contents/MacOS/main.sh" 0x99FD781B
"tools/mac/TlmViewer.app/Contents/Resources/appIcon.icns" 0x1CBA8EB3
"tools/OpenGLBuilder" 0x70C85B16
"tools/OpenGLBuilder.bat" 0xF1C468BA
"tools/PacketTarget" 0x633EBA89
"tools/PacketTarget.bat" 0xF7D93DD0
"tools/PacketViewer" 0xCFB39857
"tools/PacketViewer.bat" 0xF1C468BA
"tools/Replay" 0x15162D45
"tools/Replay.bat" 0xF1C468BA
"tools/ScpiTarget" 0x8FB2CE09
"tools/ScpiTarget.bat" 0xF7D93DD0
"tools/ScriptRunner" 0x8DF937B6
"tools/ScriptRunner.bat" 0xF1C468BA
"tools/TableManager" 0xE75FDFFE
"tools/TableManager.bat" 0xF1C468BA
"tools/TestRunner" 0x1DBDC0CF
"tools/TestRunner.bat" 0xF1C468BA
"tools/TlmExtractor" 0xE0DE48BC
"tools/TlmExtractor.bat" 0xF1C468BA
"tools/TlmGrapher" 0x8D7A0529
"tools/TlmGrapher.bat" 0xF1C468BA
"tools/TlmGrapherMemProf" 0x9A200E06
"tools/TlmGrapherMemProf.bat" 0xF1C468BA
"tools/TlmViewer" 0x120F8422
"tools/TlmViewer.bat" 0xF1C468BA
"tools/TlmViewerMemProf" 0x3CC66D92
"tools/TlmViewerMemProf.bat" 0xF1C468BA
"procedures/checks.rb" 0x34EEF3E2
"procedures/clear_util.rb" 0x5B3C1279
"procedures/collect.rb" 0x3E52C327
"procedures/collect_util.rb" 0x3952EB08
"procedures/cosmos_api_test.rb" 0x57AE9ED2
"procedures/cosmos_api_test.rb" 0xD334796E
"procedures/disconnect.rb" 0x5F3A18E5
"procedures/example_test.rb" 0x4FBA73C1
"procedures/plot_test.rb" 0x0C2972E4
Expand Down

0 comments on commit 8a1acb1

Please sign in to comment.