Commit 4abb66c
authored
Migrate over to using pathlib and subprocess.run() (#198) r=truber
* Refactor code involving resource import to not rely on os.name
* Replace various os/os.path usages with pathlib2/pathlib.
* Ignore pylint "no-member" false positive error for now.
* Remove getAbsPathForAdjacentFile and normExpUserPath.
* Fix #23 - Remove captureStdout and use subprocess32/subprocess from PyPI/stdlib throughout.
* Remove unused imports.
* subprocess-related follow-up fix.
* pathlib-related follow-up fix.
* Ignore more pylint "no-member" false positives.
* Add comment related to is_win_dumping_to_default raising WindowsError in some circumstances.
* In Python 3, winreg functions usually throw OSError instead of WindowsError.
* Oops, WindowsError is a subclass of OSError.
* Revert "Ignore more pylint "no-member" false positives."
This reverts commit 7bf932f.
* Revert "Ignore pylint "no-member" false positive error for now."
This reverts commit 42865b6.
* Remove last no-member ignore line false-positive.
* Continue to ignore no-member pylint errors until newer linter libraries get released.
* Inline scanLine function, then move last detect_malloc_errors function "amiss" into util/file_manipulation.py
* Replace logPrefix file-renaming and suffix-changing with the proper pathlib way of doing so.
* Deal with .fuzzmanagerconf files using pathlib.
* Convert Paths to make them Lithium-friendly.
* Check file sizes in truncateFile using the pathlib way.
* More pathlib fixes.
* We should assert the existence of the concatenated jsfunfuzz file a little later.
* Rename the autoBisectLogFilename and autoBisectLog variables.
* Make handle_rm_readonly Windows-only for simplification since we only use it on Windows.
* Remove superfluous __name__/__main__ line in bot.py
* Python 3 only allows binary mode when using open() with buffering=0 set.
* Use the parent/stem/suffix model of pathlib in more places.
* Make runthis retain its Path components and only convert to string when calling Lithium functions.
* Make quote usage first convert items to strings.
* Replace the filenameToReduce variable name with reduced_log.
* Force shutil usages to operate on strings.
* Rename _ to branch.
* Follow-up fix.
* Whitespace fixes.
* Fix/remove invalid comments as indicated during review.
* Remove more comments.
* Stop using range and use enumerate instead as suggested in review.
* More pathlib fixes.
* Remove bad line.
* Fix pathlib issue related to get_shell_cache_js_bin_path.
* Yet more pathlib fixes.
* Comment and whitespace changes.
* Refactor getCfgCmdExclEnv to get_cfg_cmd_excl_env and setCfgCmdExclEnv to set_cfg_cmd_excl_env.
* self.cfg should be instantiated as a list in compile_shell.
* Add a docstring for CompiledShell class.
* Inline updateRepo and remove the function.
* fork_join tests should become actual tests for pytest, commenting them out for now.
* Make a tempfile import top-level and use the backports.tempfile version from PyPI for Python 2.
* Remove unneeded 'if __name__ == "__main__":' lines.
* Remove unneeded imports from loop.py
* Consolidate subprocess32 import with others in compare_jit.py
* Rename printMachineInfo to print_machine_info and refactor it a little.
* Defend against logPrefix not being a Path, e.g. when Lithium uses it, it is likely a string.
* Rename tempPrefix to cwd_prefix.
* Make cwd_prefix explicit in using Path.cwd() when it is used.
* Convert remaining subprocess calls to use subprocess.run() instead.
* Refactor getEnvAdded to get_env_added and setEnvAdded to set_env_added.
* Fix potential issue in get_shell_compiled_runlibs_path.
* We must call Path on a path, not potentially a symlink.
* Add tests for autoconf_run and ensure_cache_dir.
* More documentation for functions in the CompiledShell class.
* Add more documentation for compare_jit function in compare_jit.
* Fix missing imports.
* Remove print_function from files that do not have any print functions.
* Add unicode_literals to the future import line of all files.
* Refactor ignoreSomeOfStderr to ignore_some_stderr and fix pylint issues.
* Re-add some pylint ignores for the compare_jit function.
* Refactor getRepoName to get_repo_name.
* Refactor getS3TarballWithExt to get_s3_tar_name_with_ext.
* Remove obsolete pylint ignore line.
* Refactor getEnvFull to get_env_full and setEnvFull to set_env_full.
* getMajorVersion and setMajorVersion seem unnecessary since they are just used/fixated off set/getVersion and both are set at the same time.
* Refactor getVersion to get_version and setVersion to set_version.
* Fix str/unicode confusion in repos_update.
* WIP: Add some FIXME comments, they really should be fixed.
* Fix pylint errors in test_autoconf_run.
* Fix the test_ensure_cache_dir test.
* Remove extra whitespace.
* Split off some helper functions from compile_shell.py into sm_compile_helpers.py
* Inline code involving version in compile_shell.
* Mostly stop catching generic Exceptions in compile_shell.
* Refactor compileJs to sm_compile and fix previous WIP/FIXME items.
* Use io.open instead of open throughout.
* Fix more issues involving the move of functions to sm_compile_helpers.
* Fix encoding issues with io.open
* Remove unneeded parenthesis.
* Fix more encoding issues with io.open in tests.
* Binary mode of io.open does not take an encoding argument.
* Fix another encoding issue.
* Lithium only takes in strings, not Paths nor bytes.
* SyntaxError fix.
* Revert "Remove unneeded 'if __name__ == "__main__":' lines."
This reverts commit 1eddcfc.
* Cast more paths to strings before decoding them.
* Most repo_dirs are now Paths.
* Fix missing imports.
* Improve dual Python 2/3 code.
* knownPath is still present so account for it for now.
* Yet another pathlib issue.
* Ensure that cwd_prefix is a Path in js_interesting.
* Collector takes in strings, not Paths.
* Expand the repo_dir path first, in build_options.
* Add an unrelated pylint ignore line.
* Run Paths in the parsing function of compare_jit through .expanduser() first.
* Raise an OSError if a file does not exist in the parsing function of compare_jit instead of a generic Exception.
* Ensure cwd_prefix is a Path in compare_jit.
* When running compare_jit standalone, ensure the temp folder that is created returns its result in the form of a Path.
* Path does not care that it is already working on a Path instance.
* Make sure also to run pathToBinary through .expanduser()
* Add more pylint ignore lines to suit PyPy3.1 parent 35b5e09 commit 4abb66c
36 files changed
Lines changed: 2087 additions & 1389 deletions
File tree
- src/funfuzz
- autobisectjs
- ccoverage
- js
- util
- tests
- js
- util
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | | - | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| 36 | + | |
33 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
34 | 43 | | |
35 | | - | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
| |||
84 | 92 | | |
85 | 93 | | |
86 | 94 | | |
87 | | - | |
| 95 | + | |
| 96 | + | |
88 | 97 | | |
89 | 98 | | |
90 | 99 | | |
| |||
102 | 111 | | |
103 | 112 | | |
104 | 113 | | |
105 | | - | |
| 114 | + | |
106 | 115 | | |
107 | 116 | | |
108 | 117 | | |
109 | | - | |
| 118 | + | |
110 | 119 | | |
111 | 120 | | |
112 | 121 | | |
| |||
118 | 127 | | |
119 | 128 | | |
120 | 129 | | |
121 | | - | |
| 130 | + | |
122 | 131 | | |
123 | 132 | | |
124 | | - | |
| 133 | + | |
125 | 134 | | |
126 | 135 | | |
127 | 136 | | |
| |||
131 | 140 | | |
132 | 141 | | |
133 | 142 | | |
134 | | - | |
| 143 | + | |
135 | 144 | | |
136 | 145 | | |
137 | | - | |
138 | 146 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
149 | 154 | | |
| 155 | + | |
150 | 156 | | |
151 | 157 | | |
152 | 158 | | |
153 | 159 | | |
154 | 160 | | |
155 | 161 | | |
156 | 162 | | |
157 | | - | |
158 | | - | |
| 163 | + | |
| 164 | + | |
159 | 165 | | |
160 | | - | |
| 166 | + | |
161 | 167 | | |
162 | 168 | | |
163 | 169 | | |
164 | 170 | | |
165 | | - | |
| 171 | + | |
166 | 172 | | |
167 | 173 | | |
| 174 | + | |
168 | 175 | | |
| 176 | + | |
| 177 | + | |
169 | 178 | | |
170 | 179 | | |
171 | 180 | | |
| |||
177 | 186 | | |
178 | 187 | | |
179 | 188 | | |
180 | | - | |
| 189 | + | |
181 | 190 | | |
182 | 191 | | |
183 | | - | |
184 | | - | |
| 192 | + | |
| 193 | + | |
185 | 194 | | |
186 | | - | |
| 195 | + | |
187 | 196 | | |
188 | 197 | | |
189 | | - | |
| 198 | + | |
190 | 199 | | |
191 | 200 | | |
192 | 201 | | |
| |||
199 | 208 | | |
200 | 209 | | |
201 | 210 | | |
202 | | - | |
| 211 | + | |
203 | 212 | | |
204 | | - | |
| 213 | + | |
205 | 214 | | |
206 | 215 | | |
207 | 216 | | |
| |||
216 | 225 | | |
217 | 226 | | |
218 | 227 | | |
219 | | - | |
| 228 | + | |
220 | 229 | | |
221 | 230 | | |
222 | 231 | | |
223 | 232 | | |
224 | 233 | | |
225 | 234 | | |
226 | 235 | | |
227 | | - | |
| 236 | + | |
228 | 237 | | |
229 | 238 | | |
230 | 239 | | |
| |||
236 | 245 | | |
237 | 246 | | |
238 | 247 | | |
239 | | - | |
240 | | - | |
| 248 | + | |
| 249 | + | |
241 | 250 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
44 | | - | |
| 49 | + | |
| 50 | + | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
0 commit comments