Closed Bug 1078981 Opened 7 years ago Closed 7 years ago

dmd.py should handle gzipped files

Categories

(Core :: DMD, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(1 file)

DMD produces .json.gz files. Currently you have to unzip them by hand before running dmd.py on them. dmd.py should be able to do this itself.
Attached patch diffSplinter Review
Attachment #8502871 - Flags: review?(continuation)
Comment on attachment 8502871 [details] [diff] [review]
diff

Review of attachment 8502871 [details] [diff] [review]:
-----------------------------------------------------------------

Note the "New Binary File: memory/replace/dmd/test/script-sort-by.json.gz" -- that file doesn't get shown in the exported patch, but it is there.
Comment on attachment 8502871 [details] [diff] [review]
diff

Review of attachment 8502871 [details] [diff] [review]:
-----------------------------------------------------------------

::: memory/replace/dmd/test/test_dmd.js
@@ +103,5 @@
>  
>    // This test has three records that are shown in a different order for each
> +  // of the different sort values. It also tests the handling of gzipped JSON
> +  // files.
> +  jsonFile = FileUtils.getFile("CurWorkD", ["script-sort-by.json.gz"]);

One alternative would be to create the zipped file on the fly, which would be nice because then the version controlled file would have useful diffs.  Probably not a big deal.

You also aren't testing ungzipped input.  Though who knows if anybody will ever use that.  I guess if you are using repeated queries you might not want to have the unzipping step all the time.
Attachment #8502871 - Flags: review?(continuation) → review+
> You also aren't testing ungzipped input.

Yes I am. There are three .json files and one .json.gz file.
https://hg.mozilla.org/mozilla-central/rev/fb7198e662d9
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.