@@ -2110,6 +2110,45 @@ def test_scanpipe_codebase_resource_queryset_has_directory_content_fingerprint(
2110
2110
results = self .project1 .codebaseresources .has_directory_content_fingerprint ()
2111
2111
self .assertQuerySetEqual (expected , results , ordered = False )
2112
2112
2113
+ def test_scanpipe_codebase_resource_elfs (self ):
2114
+ project = Project .objects .create (name = "Test" )
2115
+ CodebaseResource .objects .create (
2116
+ file_type = """ELF 32-bit LSB executable, ARM, version 1 (ARM), statically
2117
+ linked, with debug_info, not stripped""" ,
2118
+ project = project ,
2119
+ path = "a" ,
2120
+ type = CodebaseResource .Type .FILE ,
2121
+ )
2122
+ CodebaseResource .objects .create (
2123
+ file_type = """32-bit LSB executable, ARM, version 1 (ARM), statically
2124
+ linked, with debug_info, not stripped""" ,
2125
+ project = project ,
2126
+ path = "b" ,
2127
+ type = CodebaseResource .Type .FILE ,
2128
+ )
2129
+ CodebaseResource .objects .create (
2130
+ file_type = """ELF 32-bit LSB resourcable, ARM, version 1 (ARM), statically
2131
+ linked, with debug_info, not stripped""" ,
2132
+ project = project ,
2133
+ path = "c" ,
2134
+ type = CodebaseResource .Type .FILE ,
2135
+ )
2136
+ CodebaseResource .objects .create (
2137
+ file_type = """32-bit LSB relocatable, ARM, version 1 (ARM), statically
2138
+ linked, with debug_info, not stripped""" ,
2139
+ project = project ,
2140
+ path = "d" ,
2141
+ type = CodebaseResource .Type .FILE ,
2142
+ )
2143
+ CodebaseResource .objects .create (
2144
+ file_type = """ELF 32-bit LSB relocatable, ARM, version 1 (ARM), statically
2145
+ linked, with debug_info, not stripped""" ,
2146
+ project = project ,
2147
+ path = "e" ,
2148
+ type = CodebaseResource .Type .FILE ,
2149
+ )
2150
+ self .assertEqual (2 , project .codebaseresources .elfs ().count ())
2151
+
2113
2152
2114
2153
class ScanPipeModelsTransactionTest (TransactionTestCase ):
2115
2154
"""
0 commit comments