@@ -2085,6 +2085,45 @@ def test_scanpipe_codebase_resource_queryset_has_directory_content_fingerprint(
2085
2085
results = self .project1 .codebaseresources .has_directory_content_fingerprint ()
2086
2086
self .assertQuerySetEqual (expected , results , ordered = False )
2087
2087
2088
+ def test_scanpipe_codebase_resource_elfs (self ):
2089
+ project = Project .objects .create (name = "Test" )
2090
+ CodebaseResource .objects .create (
2091
+ file_type = """ELF 32-bit LSB executable, ARM, version 1 (ARM), statically
2092
+ linked, with debug_info, not stripped""" ,
2093
+ project = project ,
2094
+ path = "a" ,
2095
+ type = CodebaseResource .Type .FILE ,
2096
+ )
2097
+ CodebaseResource .objects .create (
2098
+ file_type = """32-bit LSB executable, ARM, version 1 (ARM), statically
2099
+ linked, with debug_info, not stripped""" ,
2100
+ project = project ,
2101
+ path = "b" ,
2102
+ type = CodebaseResource .Type .FILE ,
2103
+ )
2104
+ CodebaseResource .objects .create (
2105
+ file_type = """ELF 32-bit LSB resourcable, ARM, version 1 (ARM), statically
2106
+ linked, with debug_info, not stripped""" ,
2107
+ project = project ,
2108
+ path = "c" ,
2109
+ type = CodebaseResource .Type .FILE ,
2110
+ )
2111
+ CodebaseResource .objects .create (
2112
+ file_type = """32-bit LSB relocatable, ARM, version 1 (ARM), statically
2113
+ linked, with debug_info, not stripped""" ,
2114
+ project = project ,
2115
+ path = "d" ,
2116
+ type = CodebaseResource .Type .FILE ,
2117
+ )
2118
+ CodebaseResource .objects .create (
2119
+ file_type = """ELF 32-bit LSB relocatable, ARM, version 1 (ARM), statically
2120
+ linked, with debug_info, not stripped""" ,
2121
+ project = project ,
2122
+ path = "e" ,
2123
+ type = CodebaseResource .Type .FILE ,
2124
+ )
2125
+ self .assertEqual (2 , project .codebaseresources .elfs ().count ())
2126
+
2088
2127
2089
2128
class ScanPipeModelsTransactionTest (TransactionTestCase ):
2090
2129
"""
0 commit comments