piece / stagehand-testrunner

A continuous test runner for CLI
https://github.com/piece/stagehand-testrunner/wiki
BSD 2-Clause "Simplified" License
35 stars 12 forks source link

Sets the memory_limit directive to -1. #5

Closed iteman closed 12 years ago

iteman commented 12 years ago

Sometimes in MakeGood, an unexpected error Fatal error: Allowed memory size of xxx bytes exhausted ... is raised when running a test even though the memory_limit directive is set to -1 in the php.ini file.

Then the memory_limit directive is set to 256MB before running the test by PDT as following:

...
package org.eclipse.php.internal.debug.core.phpIni;
...
public class PHPINIUtil {
...
    private static void appendDefaultPHPIniContent(File phpIniFile)
            throws IOException {

        FileWriter fw = new FileWriter(phpIniFile, true);

        // TODO expose default php.ini in PHP properties
        fw.append("\ndate.timezone= \"")
                .append(Calendar.getInstance().getTimeZone().getID())
                .append("\"\n");
        fw.append("memory_limit = \"256M\"\n");
        fw.close();

    }
    ...